rephraze internal warning
This commit is contained in:
parent
c75a2265c0
commit
5f198662ff
|
@ -353,7 +353,7 @@ void CheckInternal::checkStlUsage()
|
||||||
for (const Scope *scope : symbolDatabase->functionScopes) {
|
for (const Scope *scope : symbolDatabase->functionScopes) {
|
||||||
for (const Token* tok = scope->bodyStart->next(); tok != scope->bodyEnd; tok = tok->next()) {
|
for (const Token* tok = scope->bodyStart->next(); tok != scope->bodyEnd; tok = tok->next()) {
|
||||||
if (Token::simpleMatch(tok, ". emplace ("))
|
if (Token::simpleMatch(tok, ". emplace ("))
|
||||||
reportError(tok, Severity::error, "internalStlUsage", "The 'emplace' function shall be avoided for now. 'emplace_back' is fine");
|
reportError(tok, Severity::error, "internalStlUsage", "The 'emplace' function shall be avoided for now. It is not available e.g. in Slackware 14.0. 'emplace_back' is fine.");
|
||||||
//if (Token::simpleMatch(tok, ". back ( )") && tok->astOperand1() && tok->astOperand1()->valueType() && tok->astOperand1()->valueType()->container && Token::simpleMatch(tok->astOperand1()->valueType()->container, "std :: string"))
|
//if (Token::simpleMatch(tok, ". back ( )") && tok->astOperand1() && tok->astOperand1()->valueType() && tok->astOperand1()->valueType()->container && Token::simpleMatch(tok->astOperand1()->valueType()->container, "std :: string"))
|
||||||
// reportError(tok, Severity::error, "internalStlUsage", "The 'std::string::back()' function shall be avoided for now.");
|
// reportError(tok, Severity::error, "internalStlUsage", "The 'std::string::back()' function shall be avoided for now.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue