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();
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to