diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-01-31 01:08:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-01-31 01:08:35 +0000 |
commit | 1166723df8af0f062c3f6d473d8ae7bb2b64e572 (patch) | |
tree | 9ff9bd33ecf1b5f035f51230866a4537271c8d72 /lib | |
parent | c4c62fd78a4728c9e4d4df14911a2ced9bdd2031 (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.cpp | 4 |
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 |