From: Fariborz Jahanian Date: Wed, 7 Oct 2009 16:56:50 +0000 (+0000) Subject: Removed couple of unnecessary canonicalization X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4303697cbcf1b56ea9387185d6625db2025d56ee;p=clang Removed couple of unnecessary canonicalization per Doug's obsevation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83464 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 7a8c6c0b1a..d637ed51b1 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -3693,7 +3693,7 @@ Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, QualType C1; if (const PointerType *PointerTy = C1Ty->getAs()) { C1 = PointerTy->getPointeeType(); - C1 = Context.getCanonicalType(C1).getUnqualifiedType(); + C1 = C1.getUnqualifiedType(); if (!isa(C1)) continue; } @@ -3703,7 +3703,7 @@ Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, MemPtr != MemPtrEnd; ++MemPtr) { const MemberPointerType *mptr = cast(*MemPtr); QualType C2 = QualType(mptr->getClass(), 0); - C2 = Context.getCanonicalType(C2).getUnqualifiedType(); + C2 = C2.getUnqualifiedType(); if (C1 != C2 && !IsDerivedFrom(C1, C2)) break; QualType ParamTypes[2] = { *Ptr, *MemPtr };