Skip to content

Commit a1eca64

Browse files
Update testcondition.cpp [skip ci]
1 parent 916c809 commit a1eca64

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
@@ -5503,6 +5503,13 @@ class TestCondition : public TestFixture {
55035503
" std::size_t x;\n"
55045504
"};\n");
55055505
ASSERT_EQUALS("", errout_str());
5506+
5507+
check("int g();\n" // #13441
5508+
"void f() {\n"
5509+
" int (*p)() = g;\n"
5510+
" if (p == nullptr) {}\n"
5511+
"};\n");
5512+
ASSERT_EQUALS("[test.cpp:4:11]: (style) Condition 'p==nullptr' is always false [knownConditionTrueFalse]\n", errout_str());
55065513
}
55075514

55085515
void alwaysTrueContainer() {

0 commit comments

Comments
 (0)