File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2458,9 +2458,11 @@ bool isMutableExpression(const Token* tok)
24582458{
24592459 if (!tok)
24602460 return false ;
2461+ if (!tok->exprId ())
2462+ return false ;
24612463 if (tok->isLiteral () || tok->isKeyword () || tok->isStandardType () || tok->isEnumerator ())
24622464 return false ;
2463- if (Token::Match (tok, " ,|;|:|]|)|}" ))
2465+ if (Token::Match (tok, " ,|;|:|]|)|}|:: " ))
24642466 return false ;
24652467 if (Token::simpleMatch (tok, " [ ]" ))
24662468 return false ;
@@ -2847,6 +2849,8 @@ static std::function<R()> memoize(F f)
28472849 };
28482850}
28492851
2852+ #include < iostream>
2853+
28502854template <class F ,
28512855 REQUIRES (" F must be a function that returns a Token class" ,
28522856 std::is_convertible<decltype (std::declval<F>()()), const Token*> )>
@@ -2880,7 +2884,10 @@ static bool isExpressionChangedAt(const F& getExprTok,
28802884 if (!expr)
28812885 aliased = true ;
28822886 if (!aliased)
2887+ {
2888+ std::cout << tok->str () << " " << tok->exprId () << std::endl;
28832889 aliased = isAliasOf (tok, expr, &i);
2890+ }
28842891 if (!aliased)
28852892 return false ;
28862893 if (isVariableChanged (tok, indirect + i, settings, depth))
You can’t perform that action at this time.
0 commit comments