Skip to content

Commit b4a6030

Browse files
Add todo for #9827 (#3589)
1 parent ca311eb commit b4a6030

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/testnullpointer.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3391,6 +3391,14 @@ class TestNullPointer : public TestFixture {
33913391
"[test.cpp:5]: (error) Null pointer dereference\n"
33923392
"[test.cpp:6]: (error) Null pointer dereference\n"
33933393
"[test.cpp:7]: (error) Null pointer dereference\n", errout.str());
3394+
3395+
check("std::string f() {\n" // #9827
3396+
" char* p = NULL;\n"
3397+
" const int rc = ::g(p);\n"
3398+
" std::string s(p);\n"
3399+
" return s;\n"
3400+
"}\n", /*inconclusive*/ true);
3401+
TODO_ASSERT_EQUALS("", "[test.cpp:4]: (warning, inconclusive) Possible null pointer dereference: p\n", errout.str());
33943402
}
33953403

33963404
void nullpointerStdStream() {

0 commit comments

Comments
 (0)