1 parent eb4b652 commit 771cbcfCopy full SHA for 771cbcf
1 file changed
test/testcondition.cpp
@@ -3449,6 +3449,12 @@ class TestCondition : public TestFixture {
3449
"}\n");
3450
ASSERT_EQUALS("", errout_str());
3451
3452
+ check("std::string a[3];\n" // #15065
3453
+ "void f() {\n"
3454
+ " if (a) {}\n"
3455
+ "}\n");
3456
+ ASSERT_EQUALS("[test.cpp:3:8]: (style) Condition 'a' is always true [knownConditionTrueFalse]\n", errout_str());
3457
+
3458
// Avoid FP when condition comes from macro
3459
check("#define NOT !\n"
3460
"void f() {\n"
0 commit comments