File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,11 @@ struct TargetFinder {
374374 void VisitTagType (const TagType *TT) {
375375 Outer.add (TT->getAsTagDecl (), Flags);
376376 }
377+
378+ void VisitInjectedClassNameType (const InjectedClassNameType *ICNT) {
379+ Outer.add (ICNT->getDecl (), Flags);
380+ }
381+
377382 void VisitDecltypeType (const DecltypeType *DTT) {
378383 Outer.add (DTT->getUnderlyingType (), Flags | Rel::Underlying);
379384 }
Original file line number Diff line number Diff line change @@ -286,6 +286,14 @@ TEST_F(TargetDeclTest, Types) {
286286 )cpp" ;
287287 // FIXME: We don't do a good job printing TemplateTypeParmDecls, apparently!
288288 EXPECT_DECLS (" SizeOfPackExpr" , " " );
289+
290+ Code = R"cpp(
291+ template <typename T>
292+ class Foo {
293+ void f([[Foo]] x);
294+ };
295+ )cpp" ;
296+ EXPECT_DECLS (" InjectedClassNameTypeLoc" , " class Foo" );
289297}
290298
291299TEST_F (TargetDeclTest, ClassTemplate) {
You can’t perform that action at this time.
0 commit comments