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 @@ -373,6 +373,11 @@ struct TargetFinder {
373373 void VisitTagType (const TagType *TT) {
374374 Outer.add (TT->getAsTagDecl (), Flags);
375375 }
376+
377+ void VisitInjectedClassNameType (const InjectedClassNameType *ICNT) {
378+ Outer.add (ICNT->getDecl (), Flags);
379+ }
380+
376381 void VisitDecltypeType (const DecltypeType *DTT) {
377382 Outer.add (DTT->getUnderlyingType (), Flags | Rel::Underlying);
378383 }
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