This patch fixes a bug I introduced in the previous patch. It also speeds up nested class parsing by skipping the entire class implementation using { link to jump to } rather than parsing for }. Ticket: #2172

This commit is contained in:
Robert Reif 2010-11-12 19:29:20 +01:00 committed by Daniel Marjamäki
parent 9d7a623985
commit 0fffa1f651
1 changed files with 11 additions and 0 deletions

View File

@ -744,6 +744,17 @@ void CheckClass::SpaceInfo::getVarList()
continue;
}
// It it a nested class or structure?
if (Token::Match(next, "class|struct|union %type% :|{"))
{
tok = tok->tokAt(2);
while (tok->str() != "{")
tok = tok->next();
// skip implementation
tok = tok->link();
continue;
}
// Borland C++: Ignore properties..
if (next->str() == "__property")
continue;