diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index f62ee2c0b..88263f687 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -5973,15 +5973,14 @@ bool Tokenizer::simplifyKnownVariables() // Variable is used somehow in a non-defined pattern => bail out if (tok3->varId() == varid) { - // calling member function.. bail out because this might - // have different effects to the variable. - if (Token::Match(tok3->next(), ". %var% (")) - break; - // This is a really generic bailout so let's try to avoid this. // There might be lots of false negatives. if (_settings && _settings->debugwarnings) { + // suppress debug-warning when calling member function + if (Token::Match(tok3->next(), ". %var% (")) + break; + std::list locationList; ErrorLogger::ErrorMessage::FileLocation loc; loc.line = tok3->linenr();