Browse Source

The check for code gen info is now a bit more robust.

pull/53/merge
triton 12 years ago
parent
commit
d4f28bb049
  1. 6
      src/Parser/Parser.cpp

6
src/Parser/Parser.cpp

@ -1582,9 +1582,9 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, CppSharp::AST::Function^ F, @@ -1582,9 +1582,9 @@ void Parser::WalkFunction(clang::FunctionDecl* FD, CppSharp::AST::Function^ F,
ParamStartLoc = VD->getLocEnd();
}
bool CheckCodeGenInfo = !FD->isDependentContext();
if (auto RT = FD->getResultType()->getAs<RecordType>())
if (auto RD = RT->getAsCXXRecordDecl())
bool CheckCodeGenInfo = !FD->isDependentContext() && !FD->isInvalidDecl();
if (auto RD = FD->getResultType()->getAsCXXRecordDecl())
CheckCodeGenInfo &= RD->hasDefinition();
if (CheckCodeGenInfo)

Loading…
Cancel
Save