We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1444cd8 commit bae3f47Copy full SHA for bae3f47
1 file changed
test/testunusedvar.cpp
@@ -156,6 +156,7 @@ class TestUnusedVar : public TestFixture {
156
TEST_CASE(localvar70);
157
TEST_CASE(localvar71);
158
TEST_CASE(localvar72);
159
+ TEST_CASE(localvar73);
160
TEST_CASE(localvarloops); // loops
161
TEST_CASE(localvaralias1);
162
TEST_CASE(localvaralias2); // ticket #1637
@@ -4074,6 +4075,12 @@ class TestUnusedVar : public TestFixture {
4074
4075
ASSERT_EQUALS("[test.cpp:4:12]: (style) Unused variable: mp [unusedVariable]\n", errout_str());
4076
}
4077
4078
+ void localvar73() {
4079
+ functionVariableUsage("struct S { S(); ~S(); };\n"
4080
+ "void f() { auto s{ S() }; }\n");
4081
+ ASSERT_EQUALS("", errout_str());
4082
+ }
4083
+
4084
void localvarloops() {
4085
// loops
4086
functionVariableUsage("void fun(int c) {\n"
0 commit comments