================ @@ -415,9 +443,55 @@ class ASTNodeTraverser if (!T->isSugared()) Visit(T->getPattern()); } + void VisitAutoType(const AutoType *T) { + for (const auto &Arg : T->getTypeConstraintArguments()) + Visit(Arg); + } // FIXME: ElaboratedType, DependentNameType, // DependentTemplateSpecializationType, ObjCObjectType + // For TypeLocs, we automatically visit the inner type loc (pointee type etc). + // We must explicitly visit other lexically-nested nodes. + void VisitFunctionProtoTypeLoc(FunctionProtoTypeLoc TL) { + TypeLocVisitor<Derived>::VisitFunctionTypeLoc(TL); + for (const auto *Param : TL.getParams()) + Visit(Param, /*VisitTypeLocs=*/true); + } + void VisitAutoTypeLoc(AutoTypeLoc TL) { + if (const auto *CR = TL.getConceptReference()) { ---------------- sam-mccall wrote:
If this is not a concept reference there are no children to visit here. Added tests for constrained & unconstrained AutoTypeLoc. (`void func(auto a)` is not an AutoTypeLoc, it's a TemplateTypeParmTypeLoc) https://github.com/llvm/llvm-project/pull/65484 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits