Browse Source

Skip implicit records when parsing.

This works around the following parse issue which would trigger an subsequent assert when handling source locations:

RecordDecl 0x848e5c00 <<invalid sloc>> <invalid sloc> implicit struct __va_list definition
`-FieldDecl 0x848e5c60 <<invalid sloc>> <invalid sloc> __ap 'void *'
pull/291/head
triton 12 years ago
parent
commit
d7c5da48c6
  1. 3
      src/CppParser/Parser.cpp

3
src/CppParser/Parser.cpp

@ -635,6 +635,9 @@ void Parser::WalkRecord(clang::RecordDecl* Record, Class* RC)
{ {
using namespace clang; using namespace clang;
if (Record->isImplicit())
return;
auto headStartLoc = GetDeclStartLocation(C.get(), Record); auto headStartLoc = GetDeclStartLocation(C.get(), Record);
auto headEndLoc = Record->getLocation(); // identifier location auto headEndLoc = Record->getLocation(); // identifier location
auto bodyEndLoc = Record->getLocEnd(); auto bodyEndLoc = Record->getLocEnd();

Loading…
Cancel
Save