File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -374,6 +374,11 @@ struct TargetFinder {
374
374
void VisitTagType (const TagType *TT) {
375
375
Outer.add (TT->getAsTagDecl (), Flags);
376
376
}
377
+
378
+ void VisitInjectedClassNameType (const InjectedClassNameType *ICNT) {
379
+ Outer.add (ICNT->getDecl (), Flags);
380
+ }
381
+
377
382
void VisitDecltypeType (const DecltypeType *DTT) {
378
383
Outer.add (DTT->getUnderlyingType (), Flags | Rel::Underlying);
379
384
}
Original file line number Diff line number Diff line change @@ -286,6 +286,14 @@ TEST_F(TargetDeclTest, Types) {
286
286
)cpp" ;
287
287
// FIXME: We don't do a good job printing TemplateTypeParmDecls, apparently!
288
288
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" );
289
297
}
290
298
291
299
TEST_F (TargetDeclTest, ClassTemplate) {
You can’t perform that action at this time.
0 commit comments