Skip to content

Commit

Permalink
#10591: add TODO (danmar#3647)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Dec 21, 2021
1 parent ca4e5ac commit 5a95ece
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/testunusedvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,14 @@ class TestUnusedVar : public TestFixture {
" g(t);\n"
"};\n");
ASSERT_EQUALS("", errout.str());

checkStructMemberUsage("struct T { int i; };\n"
"void f() {\n"
" struct T t{};\n"
" t.i = 0;\n" // <- used
" g(t);\n"
"};\n");
TODO_ASSERT_EQUALS("", "[test.cpp:1]: (style) struct member 'T::i' is never used.\n", errout.str()); // due to removeMacroInClassDef()
}

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

0 comments on commit 5a95ece

Please sign in to comment.