From: Rafael Espindola Date: Sun, 1 Jan 2012 18:36:59 +0000 (+0000) Subject: Use hasSameType. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27b7ce6199bfd008ba8d10c8bd91d926e2274df3;p=clang Use hasSameType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147407 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(Old) ? 1 : 0; Diag(New->getLocation(), diag::err_redefinition_different_typedef) << Kind << NewType << OldType;