You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/testother.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2849,12 +2849,12 @@ class TestOther : public TestFixture {
2849
2849
2850
2850
voidsuspiciousEqualityComparison() {
2851
2851
check("void foo(int c) {\n"
2852
-
" if (c == 1) c == 0;\n"
2852
+
" if (x) c == 0;\n"
2853
2853
"}");
2854
2854
ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious equality comparison. Did you intend to assign a value instead?\n", errout.str());
2855
2855
2856
2856
check("void foo(int* c) {\n"
2857
-
" if (*c == 1) *c == 0;\n"
2857
+
" if (x) *c == 0;\n"
2858
2858
"}");
2859
2859
ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious equality comparison. Did you intend to assign a value instead?\n", errout.str());
0 commit comments