aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-01-01 18:36:59 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-01-01 18:36:59 +0000
commit27b7ce6199bfd008ba8d10c8bd91d926e2274df3 (patch)
treea6b5af1dd1fc304cab1658819bcacd8c0864641d /lib/Sema/SemaDecl.cpp
parent3fc73ee0c613715ebce78e30b4d050ea715a007d (diff)
Use hasSameType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index a13f1826b6..c8292b930e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1379,8 +1379,7 @@ bool Sema::isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New) {
if (OldType != NewType &&
!OldType->isDependentType() &&
!NewType->isDependentType() &&
- Context.getCanonicalType(OldType) !=
- Context.getCanonicalType(NewType)) {
+ !Context.hasSameType(OldType, NewType)) {
int Kind = isa<TypeAliasDecl>(Old) ? 1 : 0;
Diag(New->getLocation(), diag::err_redefinition_different_typedef)
<< Kind << NewType << OldType;