File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ class TestNullPointer : public TestFixture {
141141 TEST_CASE (nullpointer102);
142142 TEST_CASE (nullpointer103);
143143 TEST_CASE (nullpointer104); // #13881
144+ TEST_CASE (nullpointer105); // #13861
144145 TEST_CASE (nullpointer_addressOf); // address of
145146 TEST_CASE (nullpointerSwitch); // #2626
146147 TEST_CASE (nullpointer_cast); // #4692
@@ -2929,6 +2930,17 @@ class TestNullPointer : public TestFixture {
29292930 ASSERT_EQUALS (" " , errout_str ());
29302931 }
29312932
2933+ void nullpointer105 () // #13861
2934+ {
2935+ check (" struct AB { int a; int b; };\n "
2936+ " namespace ns { typedef AB S[10]; }\n "
2937+ " void foo(void) {\n "
2938+ " ns::S x = {0};\n "
2939+ " x[1].a = 2;\n "
2940+ " }\n " );
2941+ ASSERT_EQUALS (" " , errout_str ());
2942+ }
2943+
29322944 void nullpointer_addressOf () { // address of
29332945 check (" void f() {\n "
29342946 " struct X *x = 0;\n "
You can’t perform that action at this time.
0 commit comments