fix pointer/reference check in CheckClass::noMemset symbol database conversion
This commit is contained in:
parent
5314cc02b2
commit
14c07e988e
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue