aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-01-31 01:08:35 +0000
committerDouglas Gregor <dgregor@apple.com>2013-01-31 01:08:35 +0000
commit1166723df8af0f062c3f6d473d8ae7bb2b64e572 (patch)
tree9ff9bd33ecf1b5f035f51230866a4537271c8d72 /lib
parentc4c62fd78a4728c9e4d4df14911a2ced9bdd2031 (diff)
When comparing two templates in the template differ, consider them the
same if they are actually the same; having the same name isn't enough. Fixes <rdar://problem/12931988>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTDiagnostic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp
index 514633ab5b..fb3544f03a 100644
--- a/lib/AST/ASTDiagnostic.cpp
+++ b/lib/AST/ASTDiagnostic.cpp
@@ -920,8 +920,8 @@ class TemplateDiff {
/// even if the template arguments are not.
static bool hasSameBaseTemplate(const TemplateSpecializationType *FromTST,
const TemplateSpecializationType *ToTST) {
- return FromTST->getTemplateName().getAsTemplateDecl()->getIdentifier() ==
- ToTST->getTemplateName().getAsTemplateDecl()->getIdentifier();
+ return FromTST->getTemplateName().getAsTemplateDecl()->getCanonicalDecl() ==
+ ToTST->getTemplateName().getAsTemplateDecl()->getCanonicalDecl();
}
/// hasSameTemplate - Returns true if both types are specialized from the