diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 771f303f7..0fc83b98e 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -559,7 +559,7 @@ void CheckClass::initializeVarList(const Function &func, std::list>|& %name% ") && isLikelyStreamRead(true, ftok)) { + if (Token::Match(ftok, ">>|& %name%") && isLikelyStreamRead(true, ftok)) { assignVar(ftok->next()->varId(), scope, usage); }