[clang] de5785a - [NFC] Change TemplateInstantiator to refer to the base using a typedef

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 3 09:12:10 PST 2022


Author: Erich Keane
Date: 2022-03-03T09:12:05-08:00
New Revision: de5785ad9d61c6b59793a6438a08973da42f9039

URL: https://github.com/llvm/llvm-project/commit/de5785ad9d61c6b59793a6438a08973da42f9039
DIFF: https://github.com/llvm/llvm-project/commit/de5785ad9d61c6b59793a6438a08973da42f9039.diff

LOG: [NFC] Change TemplateInstantiator to refer to the base using a typedef

A few places were inconsistent here, which makes a refactor to support
delayed concepts significantly more difficult.

Added: 
    

Modified: 
    clang/lib/Sema/SemaTemplateInstantiate.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 46da97968a937..1143023bb5baa 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1121,12 +1121,12 @@ namespace {
 
     ExprResult TransformLambdaExpr(LambdaExpr *E) {
       LocalInstantiationScope Scope(SemaRef, /*CombineWithOuterScope=*/true);
-      return TreeTransform<TemplateInstantiator>::TransformLambdaExpr(E);
+      return inherited::TransformLambdaExpr(E);
     }
 
     ExprResult TransformRequiresExpr(RequiresExpr *E) {
       LocalInstantiationScope Scope(SemaRef, /*CombineWithOuterScope=*/true);
-      return TreeTransform<TemplateInstantiator>::TransformRequiresExpr(E);
+      return inherited::TransformRequiresExpr(E);
     }
 
     bool TransformRequiresExprRequirements(
@@ -1336,10 +1336,7 @@ TemplateInstantiator::RebuildElaboratedType(SourceLocation KeywordLoc,
     }
   }
 
-  return TreeTransform<TemplateInstantiator>::RebuildElaboratedType(KeywordLoc,
-                                                                    Keyword,
-                                                                  QualifierLoc,
-                                                                    T);
+  return inherited::RebuildElaboratedType(KeywordLoc, Keyword, QualifierLoc, T);
 }
 
 TemplateName TemplateInstantiator::TransformTemplateName(
@@ -1714,7 +1711,7 @@ TemplateInstantiator::TransformDeclRefExpr(DeclRefExpr *E) {
     if (PD->isParameterPack())
       return TransformFunctionParmPackRefExpr(E, PD);
 
-  return TreeTransform<TemplateInstantiator>::TransformDeclRefExpr(E);
+  return inherited::TransformDeclRefExpr(E);
 }
 
 ExprResult TemplateInstantiator::TransformCXXDefaultArgExpr(


        


More information about the cfe-commits mailing list