Skip to content

Commit

Permalink
Skip struct initializer even if we can't extract the variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmaware committed May 25, 2016
1 parent 63437c4 commit 926e4df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions parsers/cxx/cxx_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,13 +645,13 @@ boolean cxxParserParseClassStructOrUnion(
{
// struct X Y = ...;
cxxParserExtractVariableDeclarations(g_cxx.pTokenChain,0);
}

// Skip the initialization (which almost certainly contains a block)
if(!cxxParserParseUpToOneOf(CXXTokenTypeEOF | CXXTokenTypeSemicolon))
{
CXX_DEBUG_LEAVE_TEXT("Failed to parse up to EOF/semicolon");
return FALSE;
}
// Skip the initialization (which almost certainly contains a block)
if(!cxxParserParseUpToOneOf(CXXTokenTypeEOF | CXXTokenTypeSemicolon))
{
CXX_DEBUG_LEAVE_TEXT("Failed to parse up to EOF/semicolon");
return FALSE;
}

cxxParserNewStatement();
Expand Down

0 comments on commit 926e4df

Please sign in to comment.