Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions test/testconstructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4332,6 +4332,14 @@ class TestConstructors : public TestFixture {
"template<class T1, class T2>\n"
"A<B<T1, T2>>::A() : m_value(false) {}");
ASSERT_EQUALS("", errout.str());

check("template <typename T> struct S;\n" // #11177
"template <> struct S<void> final {\n"
" explicit S(int& i);\n"
" int& m;\n"
"};\n"
"S<void>::S(int& i) : m(i) {}\n");
ASSERT_EQUALS("", errout.str());
}

void unknownTemplateType() {
Expand Down
6 changes: 6 additions & 0 deletions test/testincompletestatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,12 @@ class TestIncompleteStatement : public TestFixture {
ASSERT_EQUALS("[test.cpp:2]: (warning) Redundant code: Found a statement that begins with NULL constant.\n"
"[test.cpp:3]: (warning) Redundant code: Found a statement that begins with NULL constant.\n",
errout.str());

check("struct S { int i; };\n" // #6504
"void f(S* s) {\n"
" (*s).i;\n"
"}\n");
ASSERT_EQUALS("[test.cpp:3]: (warning) Redundant code: Found unused member access.\n", errout.str());
}

void vardecl() {
Expand Down