File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ class TestNullPointer : public TestFixture {
145145 TEST_CASE (nullpointer105); // #13861
146146 TEST_CASE (nullpointer106); // #13682
147147 TEST_CASE (nullpointer107); // #13682 (FP/FN cases around guards that depend on the pointer indirectly)
148+ TEST_CASE (nullpointer108);
148149 TEST_CASE (nullpointer_addressOf); // address of
149150 TEST_CASE (nullpointerSwitch); // #2626
150151 TEST_CASE (nullpointer_cast); // #4692
@@ -3105,6 +3106,18 @@ class TestNullPointer : public TestFixture {
31053106 ASSERT_EQUALS (" " , errout_str ());
31063107 }
31073108
3109+ void nullpointer108 ()
3110+ {
3111+ check (" boost::asio::awaitable<int> test()\n "
3112+ " {\n "
3113+ " const auto *s = getStr();\n "
3114+ " if(!s) co_return int{1};\n "
3115+ " std::print(\" {}\" ,*s);\n "
3116+ " co_return int{9};\n "
3117+ " }\n " );
3118+ ASSERT_EQUALS (" " , errout_str ());
3119+ }
3120+
31083121 void nullpointer_addressOf () { // address of
31093122 check (" void f() {\n "
31103123 " struct X *x = 0;\n "
You can’t perform that action at this time.
0 commit comments