Skip to content

Commit 325c86d

Browse files
Update testunusedvar.cpp
1 parent e95639c commit 325c86d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testunusedvar.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7079,6 +7079,15 @@ class TestUnusedVar : public TestFixture {
70797079
" A<int> a;\n"
70807080
"}\n");
70817081
ASSERT_EQUALS("[test.cpp:6:12]: (style) Unused variable: a [unusedVariable]\n", errout_str());
7082+
7083+
functionVariableUsage("template <typename T>\n" // #14784
7084+
"struct A {\n"
7085+
" A() {}\n"
7086+
"};\n"
7087+
"void f() {\n"
7088+
" A<int> a;\n"
7089+
"}\n");
7090+
ASSERT_EQUALS("[test.cpp:6:12]: (style) Unused variable: a [unusedVariable]\n", errout_str());
70827091
}
70837092

70847093
void localvarFuncPtr() {

0 commit comments

Comments
 (0)