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/testtype.cpp
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -295,6 +295,11 @@ class TestType : public TestFixture {
295
295
" return 123456U * x;\n"
296
296
"}",settings);
297
297
ASSERT_EQUALS("", errout.str());
298
+
299
+
check("int f(int i) {\n"// #12117
300
+
" return (i == 31) ? 1 << i : 0;\n"
301
+
"}", settings);
302
+
ASSERT_EQUALS("[test.cpp:2] -> [test.cpp:2]: (warning) Shifting signed 32-bit value by 31 bits is undefined behaviour. See condition at line 2.\n", errout.str());
0 commit comments