This commit is contained in:
parent
5c2a2a5c22
commit
d2caf89706
|
@ -426,7 +426,8 @@ void CheckCondition::oppositeInnerCondition()
|
|||
}
|
||||
if (Token::Match(tok->previous(), "++|--|& %var%"))
|
||||
break;
|
||||
if (Token::Match(tok, "%var% . %var% (") &&
|
||||
if (tok->variable() &&
|
||||
Token::Match(tok, "%var% . %var% (") &&
|
||||
!tok->variable()->isConst() &&
|
||||
!(tok->tokAt(2)->function() && tok->tokAt(2)->function()->isConst))
|
||||
break;
|
||||
|
|
|
@ -1091,6 +1091,18 @@ private:
|
|||
" }\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// #6385 "crash in Variable::getFlag()"
|
||||
check("class TranslationHandler {\n"
|
||||
"QTranslator *mTranslator;\n"
|
||||
"void SetLanguage() {\n"
|
||||
" if (mTranslator) {\n"
|
||||
" qApp->removeTranslator(mTranslator);\n"
|
||||
" }\n"
|
||||
" }\n"
|
||||
"};");
|
||||
ASSERT_EQUALS("", errout.str()); // just don't crash...
|
||||
|
||||
}
|
||||
|
||||
// #5731 - fp when undeclared variable is used
|
||||
|
|
Loading…
Reference in New Issue