fix pointer/reference check in CheckClass::noMemset symbol database conversion

This commit is contained in:
Robert Reif 2011-03-22 22:29:39 -04:00
parent 5314cc02b2
commit 14c07e988e
1 changed files with 1 additions and 1 deletions

View File

@ -722,7 +722,7 @@ void CheckClass::checkMemsetType(const Scope *start, const Token *tok, const Sco
tok1 = tok1->next(); tok1 = tok1->next();
// check for std:: type that is not a pointer or reference // check for std:: type that is not a pointer or reference
if (Token::simpleMatch(tok1, "std ::") && !Token::Match(var->nameToken(), "*|&")) if (Token::simpleMatch(tok1, "std ::") && !Token::Match(var->nameToken()->previous(), "*|&"))
memsetError(tok, tok->str(), "'std::" + tok1->strAt(2) + "'", type->classDef->str()); memsetError(tok, tok->str(), "'std::" + tok1->strAt(2) + "'", type->classDef->str());
/** @todo warn if type is class/struct that doesn't require initialization */ /** @todo warn if type is class/struct that doesn't require initialization */