diff --git a/lib/checkboost.cpp b/lib/checkboost.cpp index 447d20428..936acde65 100644 --- a/lib/checkboost.cpp +++ b/lib/checkboost.cpp @@ -51,6 +51,6 @@ void CheckBoost::checkBoostForeachModification() void CheckBoost::boostForeachError(const Token *tok) { reportError(tok, Severity::error, "boostForeachError", - "BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container." + "BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container inside." ); } diff --git a/test/testboost.cpp b/test/testboost.cpp index 9980ee3af..e2b4c5179 100644 --- a/test/testboost.cpp +++ b/test/testboost.cpp @@ -61,7 +61,7 @@ private: " data.push_back(123);\n" " }\n" "}"); - ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container inside.\n", errout.str()); check("void f() {\n" " set data;\n" @@ -69,7 +69,7 @@ private: " data.insert(123);\n" " }\n" "}"); - ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container inside.\n", errout.str()); check("void f() {\n" " set data;\n" @@ -77,7 +77,7 @@ private: " data.erase(123);\n" " }\n" "}"); - ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container inside.\n", errout.str()); // Check single line usage check("void f() {\n" @@ -85,7 +85,7 @@ private: " BOOST_FOREACH(const int &i, data)\n" " data.clear();\n" "}"); - ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) BOOST_FOREACH caches the end() iterator. It's undefined behavior if you modify the container inside.\n", errout.str()); // Container returned as result of a function -> Be quiet check("void f() {\n"