diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index d3d1022e1c..196964242d 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -3284,13 +3284,13 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F, return; auto& CGInfo = GetCodeGenFunctionInfo(codeGenTypes, FD); - F->isReturnIndirect = CGInfo.getReturnInfo().isIndirect(); + F->isReturnIndirect = CGInfo.getReturnInfo().isIndirect() || + CGInfo.getReturnInfo().isInAlloca(); unsigned Index = 0; for (const auto& Arg : CGInfo.arguments()) { - F->Parameters[Index++]->isIndirect = - Arg.info.isIndirect() && !Arg.info.getIndirectByVal(); + F->Parameters[Index++]->isIndirect = Arg.info.isIndirect(); } MarkValidity(F);