We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f8ce70 commit 406c319Copy full SHA for 406c319
1 file changed
test/testunusedvar.cpp
@@ -6983,6 +6983,15 @@ class TestUnusedVar : public TestFixture {
6983
" return hash[0];\n"
6984
"}\n");
6985
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());
6995
}
6996
6997
void localvarFuncPtr() {
0 commit comments