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:
parent
9d7a623985
commit
0fffa1f651
@ -744,6 +744,17 @@ void CheckClass::SpaceInfo::getVarList()
|
|||||||
continue;
|
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..
|
// Borland C++: Ignore properties..
|
||||||
if (next->str() == "__property")
|
if (next->str() == "__property")
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user