@@ -229,13 +229,9 @@ TEST(WalkAST, FunctionTemplates) {
229
229
EXPECT_THAT (testWalk (" template<typename T> void foo(T) {}" ,
230
230
" template void ^foo<int>(int);" ),
231
231
ElementsAre ());
232
- // FIXME: Report specialized template as used from explicit specializations.
233
- EXPECT_THAT (testWalk (" template<typename T> void foo(T);" ,
232
+ EXPECT_THAT (testWalk (" template<typename T> void $explicit^foo(T);" ,
234
233
" template<> void ^foo<int>(int);" ),
235
- ElementsAre ());
236
- EXPECT_THAT (testWalk (" template<typename T> void foo(T) {}" ,
237
- " template<typename T> void ^foo(T*) {}" ),
238
- ElementsAre ());
234
+ ElementsAre (Decl::FunctionTemplate));
239
235
240
236
// Implicit instantiations references most relevant template.
241
237
EXPECT_THAT (testWalk (R"cpp(
@@ -510,6 +506,8 @@ TEST(WalkAST, Functions) {
510
506
// Definition uses declaration, not the other way around.
511
507
testWalk (" void $explicit^foo();" , " void ^foo() {}" );
512
508
testWalk (" void foo() {}" , " void ^foo();" );
509
+ testWalk (" template <typename> void $explicit^foo();" ,
510
+ " template <typename> void ^foo() {}" );
513
511
514
512
// Unresolved calls marks all the overloads.
515
513
testWalk (" void $ambiguous^foo(int); void $ambiguous^foo(char);" ,
0 commit comments