diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 6b9362714..1d960fe82 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -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;