Skip to content

Commit fef16fb

Browse files
Update testconstructors.cpp
1 parent ed7a13a commit fef16fb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

test/testconstructors.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,15 @@ class TestConstructors : public TestFixture {
760760
}
761761

762762
void noConstructor16() {
763-
check("struct S {\n"
763+
check("struct S {\n" // #14546
764764
" int a = 0, b;\n"
765765
"};\n");
766766
ASSERT_EQUALS("[test.cpp:1:10]: (warning) Member variable 'S::b' is not initialized in the constructor. [uninitMemberVar]\n", errout_str());
767+
768+
check("struct S {\n"
769+
" int a, b;\n"
770+
"};\n");
771+
ASSERT_EQUALS("", errout_str());
767772
}
768773

769774
// ticket #4290 "False Positive: style (noConstructor): The class 'foo' does not have a constructor."

0 commit comments

Comments
 (0)