diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 70f2132e0456f7..54896e73789332 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -5462,6 +5462,13 @@ void printTemplateArgumentList(raw_ostream &OS, const PrintingPolicy &Policy, const TemplateParameterList *TPL = nullptr); +/// Make a best-effort determination of whether the type T can be produced by +/// substituting Args into the default argument of Param. +bool isSubstitutedDefaultArgument(ASTContext &Ctx, TemplateArgument Arg, + const NamedDecl *Param, + ArrayRef Args, + unsigned Depth); + /// The injected class name of a C++ class template or class /// template partial specialization. Used to record that a type was /// spelled with a bare identifier rather than as a template-id; the diff --git a/clang/lib/AST/TypePrinter.cpp b/clang/lib/AST/TypePrinter.cpp index 5353243b8a0cf6..bfab41b7e4deab 100644 --- a/clang/lib/AST/TypePrinter.cpp +++ b/clang/lib/AST/TypePrinter.cpp @@ -2044,9 +2044,7 @@ static bool isSubstitutedTemplateArgument(ASTContext &Ctx, TemplateArgument Arg, return false; } -/// Make a best-effort determination of whether the type T can be produced by -/// substituting Args into the default argument of Param. -static bool isSubstitutedDefaultArgument(ASTContext &Ctx, TemplateArgument Arg, +bool clang::isSubstitutedDefaultArgument(ASTContext &Ctx, TemplateArgument Arg, const NamedDecl *Param, ArrayRef Args, unsigned Depth) {