From be48de1be94219ade89f5731a8bec66a389f81ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 22 Apr 2018 07:40:11 +0200 Subject: [PATCH] CheckClass: Use isLikelyStreamRead --- lib/checkclass.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 57517023e..ac3e4472b 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -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> %name%")) { + if (Token::Match(ftok, ">>|& %name% ") && isLikelyStreamRead(true, ftok)) { assignVar(ftok->next()->varId(), scope, usage); }