Skip to content

Commit 93ca67e

Browse files
Update testcondition.cpp
1 parent d0bf6bc commit 93ca67e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/testcondition.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6375,6 +6375,13 @@ class TestCondition : public TestFixture {
63756375
ASSERT_EQUALS("[test.cpp:3:14]: (style) Comparing expression of type 'const unsigned int &' against value 4294967295. Condition is always true. [compareValueOutOfTypeRangeError]\n"
63766376
"[test.cpp:4:13]: (style) Comparing expression of type 'const unsigned int &' against value 4294967295. Condition is always false. [compareValueOutOfTypeRangeError]\n",
63776377
errout_str());
6378+
6379+
check("void f() {\n"
6380+
" long long ll = 1024 * 1024 * 1024;\n"
6381+
" if (ll * 8 < INT_MAX) {}\n"
6382+
" if (INT_MAX > ll * 8) {}\n"
6383+
"}\n");
6384+
ASSERT_EQUALS("", errout_str());
63786385
}
63796386

63806387
void knownConditionCast() {

0 commit comments

Comments
 (0)