File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ void CheckFunctions::checkIgnoredReturnValue()
254254
255255 const Token *parent = tok->next ()->astParent ();
256256 while (Token::Match (parent, " %cop%" )) {
257- if (Token::Match (parent, " <<|>>" ) && !parent->astParent ())
257+ if (Token::Match (parent, " <<|>>|* " ) && !parent->astParent ())
258258 break ;
259259 parent = parent->astParent ();
260260 }
Original file line number Diff line number Diff line change @@ -1451,6 +1451,10 @@ class TestFunctions : public TestFixture {
14511451 " }" , " test.cpp" , &settings2);
14521452 ASSERT_EQUALS (" [test.cpp:2]: (warning) Return value of function mystrcmp() is not used.\n " , errout.str ());
14531453
1454+ check (" void f(std::vector<int*> v) {\n "
1455+ " delete *v.begin();\n "
1456+ " }\n " );
1457+ ASSERT_EQUALS (" " , errout.str ());
14541458 }
14551459
14561460 void checkIgnoredErrorCode () {
You can’t perform that action at this time.
0 commit comments