Skip to content

Commit 5a95ece

Browse files
#10591: add TODO (danmar#3647)
1 parent ca4e5ac commit 5a95ece

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/testunusedvar.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,14 @@ class TestUnusedVar : public TestFixture {
15911591
" g(t);\n"
15921592
"};\n");
15931593
ASSERT_EQUALS("", errout.str());
1594+
1595+
checkStructMemberUsage("struct T { int i; };\n"
1596+
"void f() {\n"
1597+
" struct T t{};\n"
1598+
" t.i = 0;\n" // <- used
1599+
" g(t);\n"
1600+
"};\n");
1601+
TODO_ASSERT_EQUALS("", "[test.cpp:1]: (style) struct member 'T::i' is never used.\n", errout.str()); // due to removeMacroInClassDef()
15941602
}
15951603

15961604
void functionVariableUsage_(const char* file, int line, const char code[], const char filename[] = "test.cpp") {

0 commit comments

Comments
 (0)