CheckClass: Use isLikelyStreamRead

This commit is contained in:
Daniel Marjamäki 2018-04-22 07:40:11 +02:00
parent 121d4ff2ba
commit be48de1be9
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@
//---------------------------------------------------------------------------
#include "checkclass.h"
#include "astutils.h"
#include "errorlogger.h"
#include "library.h"
#include "settings.h"
@ -558,7 +559,7 @@ void CheckClass::initializeVarList(const Function &func, std::list<const Functio
continue;
// Variable getting value from stream?
if (Token::Match(ftok, ">> %name%")) {
if (Token::Match(ftok, ">>|& %name% ") && isLikelyStreamRead(true, ftok)) {
assignVar(ftok->next()->varId(), scope, usage);
}