Skip to content

Commit 406c319

Browse files
Update testunusedvar.cpp
1 parent 0f8ce70 commit 406c319

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
@@ -6983,6 +6983,15 @@ class TestUnusedVar : public TestFixture {
69836983
" return hash[0];\n"
69846984
"}\n");
69856985
ASSERT_EQUALS("", errout_str());
6986+
6987+
functionVariableUsage("template <int N>\n" // #14199
6988+
"struct S {\n"
6989+
" int i;\n"
6990+
"};\n"
6991+
"void f() {\n"
6992+
" S<0> s;\n"
6993+
"}\n");
6994+
ASSERT_EQUALS("[test.cpp:6:10]: (style) Unused variable: s [unusedVariable]", errout_str());
69866995
}
69876996

69886997
void localvarFuncPtr() {

0 commit comments

Comments
 (0)