[clang] 2d4035e - Fix structural comparison of template template arguments to compare the

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 19:15:36 PST 2020


Author: Richard Smith
Date: 2020-11-11T19:15:21-08:00
New Revision: 2d4035e493e3933e8819ee090a66fd6db3cbd8ef

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

LOG: Fix structural comparison of template template arguments to compare the
right union member.

Should fix the armv8 buildbot.

Added: 
    

Modified: 
    clang/lib/AST/TemplateBase.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp
index 22af2545779d..dd898b2f808b 100644
--- a/clang/lib/AST/TemplateBase.cpp
+++ b/clang/lib/AST/TemplateBase.cpp
@@ -288,11 +288,14 @@ bool TemplateArgument::structurallyEquals(const TemplateArgument &Other) const {
   case Null:
   case Type:
   case Expression:
-  case Template:
-  case TemplateExpansion:
   case NullPtr:
     return TypeOrValue.V == Other.TypeOrValue.V;
 
+  case Template:
+  case TemplateExpansion:
+    return TemplateArg.Name == Other.TemplateArg.Name &&
+           TemplateArg.NumExpansions == Other.TemplateArg.NumExpansions;
+
   case Declaration:
     return getAsDecl() == Other.getAsDecl();
 


        


More information about the cfe-commits mailing list