Fix FP in constVariable
This commit is contained in:
parent
9ece849d80
commit
6f4ce486a2
|
@ -1903,7 +1903,7 @@ bool isVariableChangedByFunctionCall(const Token *tok, int indirect, const Setti
|
|||
return false; // not a function => variable not changed
|
||||
if (Token::simpleMatch(tok, "{") && isTrivialConstructor(tok))
|
||||
return false;
|
||||
if (tok->isKeyword() && !isCPPCastKeyword(tok))
|
||||
if (tok->isKeyword() && !isCPPCastKeyword(tok) && tok->str().compare(0,8,"operator") != 0)
|
||||
return false;
|
||||
const Token * parenTok = tok->next();
|
||||
if (Token::simpleMatch(parenTok, "<") && parenTok->link())
|
||||
|
|
|
@ -1801,6 +1801,13 @@ private:
|
|||
check(code, &s64);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
check("Writer* getWriter();\n"
|
||||
"\n"
|
||||
"void foo(Buffer& buffer) {\n"
|
||||
" getWriter()->operator<<(buffer);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void passedByValue_externC() {
|
||||
|
|
Loading…
Reference in New Issue