Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions test/testconstructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,23 @@ class TestConstructors : public TestFixture {
"}");
ASSERT_EQUALS("[test.cpp:11]: (warning) Member variable 'Foo::mMember' is not initialized in the constructor.\n", errout.str());

// constructor outside namespace with using, #4792
check("namespace Output\n"
"{\n"
" class Foo\n"
" {\n"
" public:\n"
" Foo();\n"
" private:\n"
" bool mMember;\n"
" };\n"
"}\n"
"using namespace Output;"
"Foo::Foo()\n"
"{\n"
"}");
ASSERT_EQUALS("[test.cpp:11]: (warning) Member variable 'Foo::mMember' is not initialized in the constructor.\n", errout.str());

// constructor in separate namespace
check("namespace Output\n"
"{\n"
Expand Down