================
@@ -1205,8 +1205,15 @@ class TemplateDiff {
              "Both template specializations need to be valid.");
       Qualifiers FromQual = FromType.getQualifiers(),
                  ToQual = ToType.getQualifiers();
-      FromQual -= QualType(FromArgTST, 0).getQualifiers();
-      ToQual -= QualType(ToArgTST, 0).getQualifiers();
+      // FromQual -= QualType(FromArgTST, 0).getQualifiers();
+      // ToQual -= QualType(ToArgTST, 0).getQualifiers();
+      bool Same = false;
+      if (FromArgTST->getTemplateName().getAsTemplateDecl() == 
+          ToArgTST->getTemplateName().getAsTemplateDecl()) {
+        // If the names match, the ONLY thing that makes them different is the 
Qualifiers
----------------
cor3ntin wrote:

```suggestion
        // If the template are the same, the types might still differ by their 
qualification.
```

You could rewrite the whole thing as


```cpp
bool Same = FromArgTST->getTemplateName().getAsTemplateDecl() == 
          ToArgTST->getTemplateName().getAsTemplateDecl() && FromQual == ToQual;
```

https://github.com/llvm/llvm-project/pull/180175
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to