File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ class TestUnusedVar : public TestFixture {
154154 TEST_CASE (localvar69);
155155 TEST_CASE (localvar70);
156156 TEST_CASE (localvar71);
157+ TEST_CASE (localvar72);
157158 TEST_CASE (localvarloops); // loops
158159 TEST_CASE (localvaralias1);
159160 TEST_CASE (localvaralias2); // ticket #1637
@@ -4046,6 +4047,15 @@ class TestUnusedVar : public TestFixture {
40464047 ASSERT_EQUALS (" " , errout_str ());
40474048 }
40484049
4050+ void localvar72 () {
4051+ functionVariableUsage (" void f()\n "
4052+ " {\n "
4053+ " struct S {};\n "
4054+ " int S::* mp;\n "
4055+ " }\n " );
4056+ ASSERT_EQUALS (" [test.cpp:4:12]: (style) Unused variable: mp [unusedVariable]\n " , errout_str ());
4057+ }
4058+
40494059 void localvarloops () {
40504060 // loops
40514061 functionVariableUsage (" void fun(int c) {\n "
You can’t perform that action at this time.
0 commit comments