From b4a60305f9c5c68cc5e9d0aa63c146a0192e8c2c Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 29 Nov 2021 19:12:07 +0100 Subject: [PATCH] Add todo for #9827 (#3589) --- test/testnullpointer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index 1ff34e3f6..4df70d141 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -3391,6 +3391,14 @@ private: "[test.cpp:5]: (error) Null pointer dereference\n" "[test.cpp:6]: (error) Null pointer dereference\n" "[test.cpp:7]: (error) Null pointer dereference\n", errout.str()); + + check("std::string f() {\n" // #9827 + " char* p = NULL;\n" + " const int rc = ::g(p);\n" + " std::string s(p);\n" + " return s;\n" + "}\n", /*inconclusive*/ true); + TODO_ASSERT_EQUALS("", "[test.cpp:4]: (warning, inconclusive) Possible null pointer dereference: p\n", errout.str()); } void nullpointerStdStream() {