@@ -121,7 +121,7 @@ class TestUnusedPrivateFunction : public TestFixture {
121
121
" unsigned int Fred::f()\n "
122
122
" { }" );
123
123
124
- ASSERT_EQUALS (" [test.cpp:4:18]: (style) Unused private function: 'Fred::f' [unusedPrivateFunction]\n " , errout_str ());
124
+ ASSERT_EQUALS (" [test.cpp:4:18] -> [test.cpp:12:20] : (style) Unused private function: 'Fred::f' [unusedPrivateFunction]\n " , errout_str ());
125
125
126
126
check (" #line 1 \" p.h\"\n "
127
127
" class Fred\n "
@@ -139,7 +139,7 @@ class TestUnusedPrivateFunction : public TestFixture {
139
139
" unsigned int Fred::f()\n "
140
140
" { }" );
141
141
142
- ASSERT_EQUALS (" [p.h:4:18]: (style) Unused private function: 'Fred::f' [unusedPrivateFunction]\n " , errout_str ());
142
+ ASSERT_EQUALS (" [p.h:4:18] -> [p.cpp:4:20] : (style) Unused private function: 'Fred::f' [unusedPrivateFunction]\n " , errout_str ());
143
143
144
144
check (" #line 1 \" p.h\"\n "
145
145
" class Fred\n "
@@ -154,7 +154,7 @@ class TestUnusedPrivateFunction : public TestFixture {
154
154
" void Fred::f()\n "
155
155
" {\n "
156
156
" }" );
157
- ASSERT_EQUALS (" [p.h:4:6]: (style) Unused private function: 'Fred::f' [unusedPrivateFunction]\n " , errout_str ());
157
+ ASSERT_EQUALS (" [p.h:4:6] -> [p.cpp:2:12] : (style) Unused private function: 'Fred::f' [unusedPrivateFunction]\n " , errout_str ());
158
158
159
159
// Don't warn about include files which implementation we don't see
160
160
check (" #line 1 \" p.h\"\n "
@@ -274,7 +274,7 @@ class TestUnusedPrivateFunction : public TestFixture {
274
274
" Fred::Fred()\n "
275
275
" {}" );
276
276
277
- ASSERT_EQUALS (" [test.cpp:6:12]: (style) Unused private function: 'Fred::get' [unusedPrivateFunction]\n " , errout_str ());
277
+ ASSERT_EQUALS (" [test.cpp:6:12] -> [test.cpp:6:12] : (style) Unused private function: 'Fred::get' [unusedPrivateFunction]\n " , errout_str ());
278
278
}
279
279
280
280
@@ -416,7 +416,7 @@ class TestUnusedPrivateFunction : public TestFixture {
416
416
" static void f()\n "
417
417
" { }\n "
418
418
" };" );
419
- ASSERT_EQUALS (" [test.cpp:10:17]: (style) Unused private function: 'A::f' [unusedPrivateFunction]\n " , errout_str ());
419
+ ASSERT_EQUALS (" [test.cpp:10:17] -> [test.cpp:10:17] : (style) Unused private function: 'A::f' [unusedPrivateFunction]\n " , errout_str ());
420
420
421
421
check (" class A\n "
422
422
" {\n "
@@ -505,7 +505,7 @@ class TestUnusedPrivateFunction : public TestFixture {
505
505
" void foo() {}\n " // Skip for overrides of virtual functions of base
506
506
" void bar() {}\n " // Don't skip if no function is overridden
507
507
" };" );
508
- ASSERT_EQUALS (" [test.cpp:9:10]: (style) Unused private function: 'derived::bar' [unusedPrivateFunction]\n " , errout_str ());
508
+ ASSERT_EQUALS (" [test.cpp:9:10] -> [test.cpp:9:10] : (style) Unused private function: 'derived::bar' [unusedPrivateFunction]\n " , errout_str ());
509
509
510
510
check (" class Base {\n "
511
511
" private:\n "
@@ -580,7 +580,7 @@ class TestUnusedPrivateFunction : public TestFixture {
580
580
" friend Bar;\n "
581
581
" void f() { }\n "
582
582
" };" );
583
- ASSERT_EQUALS (" [test.cpp:5:10]: (style) Unused private function: 'Foo::f' [unusedPrivateFunction]\n " , errout_str ());
583
+ ASSERT_EQUALS (" [test.cpp:5:10] -> [test.cpp:5:10] : (style) Unused private function: 'Foo::f' [unusedPrivateFunction]\n " , errout_str ());
584
584
585
585
check (" struct F;\n " // #10265
586
586
" struct S {\n "
@@ -667,7 +667,7 @@ class TestUnusedPrivateFunction : public TestFixture {
667
667
" void startListening() {\n "
668
668
" }\n "
669
669
" };" );
670
- ASSERT_EQUALS (" [test.cpp:8:10]: (style) Unused private function: 'Fred::startListening' [unusedPrivateFunction]\n " , errout_str ());
670
+ ASSERT_EQUALS (" [test.cpp:8:10] -> [test.cpp:8:10] : (style) Unused private function: 'Fred::startListening' [unusedPrivateFunction]\n " , errout_str ());
671
671
672
672
// #5059
673
673
check (" class Fred {\n "
@@ -836,7 +836,7 @@ class TestUnusedPrivateFunction : public TestFixture {
836
836
" };\n "
837
837
" int Foo::i = sth();"
838
838
" int i = F();" );
839
- ASSERT_EQUALS (" [test.cpp:3:16]: (style) Unused private function: 'Foo::F' [unusedPrivateFunction]\n " , errout_str ());
839
+ ASSERT_EQUALS (" [test.cpp:3:16] -> [test.cpp:3:16] : (style) Unused private function: 'Foo::F' [unusedPrivateFunction]\n " , errout_str ());
840
840
}
841
841
842
842
void templateSimplification () { // ticket #6183
0 commit comments