diff --git a/lib/checkother.cpp b/lib/checkother.cpp index d9ac6dfc8..3f47fe7b1 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2537,7 +2537,7 @@ void CheckOther::checkMisusedScopedObject() std::set identifiers; for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { - if (Token::Match(tok, "class|struct %var% [:{]")) + if (Token::Match(tok, "class|struct %var% [:{;]")) identifiers.insert(tok->next()->str()); }