Skip to content

Commit b4c8be1

Browse files
committed
Fix
1 parent 256f3c3 commit b4c8be1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/testother.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,7 +3914,9 @@ class TestOther : public TestFixture {
39143914
" (void)(true);\n"
39153915
" if (r) {}\n"
39163916
"}\n");
3917-
ASSERT_EQUALS("[test.cpp:1:13]: (style) Parameter 'r' can be declared as reference to const [constParameterReference]\n", errout_str());
3917+
ASSERT_EQUALS("[test.cpp:2:5]: (warning) Redundant code: Found a statement that begins with bool constant. [constStatement]\n"
3918+
"[test.cpp:1:13]: (style) Parameter 'r' can be declared as reference to const [constParameterReference]\n",
3919+
errout_str());
39183920

39193921
check("struct S { void f(int&); };\n" // #12216
39203922
"void g(S& s, int& r, void (S::* p2m)(int&)) {\n"
@@ -7012,7 +7014,8 @@ class TestOther : public TestFixture {
70127014
" std::pair<int, int>(1, 2);\n"
70137015
" (void)0;\n"
70147016
"}\n");
7015-
ASSERT_EQUALS("[test.cpp:2:10]: (style) Instance of 'std::string' object is destroyed immediately. [unusedScopedObject]\n"
7017+
ASSERT_EQUALS("[test.cpp:5:5]: (warning) Redundant code: Found a statement that begins with numeric constant. [constStatement]\n"
7018+
"[test.cpp:2:10]: (style) Instance of 'std::string' object is destroyed immediately. [unusedScopedObject]\n"
70167019
"[test.cpp:3:10]: (style) Instance of 'std::string' object is destroyed immediately. [unusedScopedObject]\n"
70177020
"[test.cpp:4:10]: (style) Instance of 'std::pair' object is destroyed immediately. [unusedScopedObject]\n",
70187021
errout_str());

0 commit comments

Comments
 (0)