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/teststl.cpp
+7-1
Original file line number
Diff line number
Diff line change
@@ -692,13 +692,19 @@ class TestStl : public TestFixture {
692
692
" if (i <= static_cast<int>(v.size())) {\n"
693
693
" if (v[i]) {}\n"
694
694
" }\n"
695
+
" if (i <= int(v.size())) {\n"
696
+
" if (v[i]) {}\n"
697
+
" }\n"
695
698
"}\n");
696
699
ASSERT_EQUALS("test.cpp:3:warning:Either the condition 'i<=(int)v.size()' is redundant or 'i' can have the value v.size(). Expression 'v[i]' causes access out of bounds.\n"
697
700
"test.cpp:2:note:condition 'i<=(int)v.size()'\n"
698
701
"test.cpp:3:note:Access out of bounds\n"
699
702
"test.cpp:6:warning:Either the condition 'i<=static_cast<int>(v.size())' is redundant or 'i' can have the value v.size(). Expression 'v[i]' causes access out of bounds.\n"
"test.cpp:9:warning:Either the condition 'i<=int(v.size())' is redundant or 'i' can have the value v.size(). Expression 'v[i]' causes access out of bounds.\n"
0 commit comments