[clang] [clang] Implement CTAD for type alias template. (PR #77890)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 23 06:14:40 PST 2024


================
@@ -10525,9 +10534,11 @@ class Sema final {
       SourceLocation PointOfInstantiation, FunctionDecl *Decl,
       ArrayRef<TemplateArgument> TemplateArgs,
       ConstraintSatisfaction &Satisfaction);
-  FunctionDecl *InstantiateFunctionDeclaration(FunctionTemplateDecl *FTD,
-                                               const TemplateArgumentList *Args,
-                                               SourceLocation Loc);
+  FunctionDecl *InstantiateFunctionDeclaration(
+      FunctionTemplateDecl *FTD, const TemplateArgumentList *Args,
+      SourceLocation Loc,
+      CodeSynthesisContext::SynthesisKind CSC =
+          CodeSynthesisContext::ExplicitTemplateArgumentSubstitution);
----------------
hokein wrote:

This is a refactoring and non-functional change, before this patch, we always use the `CodeSynthesisContext::ExplicitTemplateArgumentSubstitution` in this API [implementation](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp#L4865), the change here is to promote it to a function parameter (making a default value so that we don't need to change all existing callsites)

https://github.com/llvm/llvm-project/pull/77890


More information about the cfe-commits mailing list