From: Steve Naroff Date: Tue, 13 Nov 2007 00:31:42 +0000 (+0000) Subject: Fix Sema::CheckAssignmentConstraints() to operate on the canonical, unqualified type. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8eabdffa942f22599f7626d85d16ff150fa164af;p=clang Fix Sema::CheckAssignmentConstraints() to operate on the canonical, unqualified type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44036 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index 8f816e67ef..976069e669 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -1045,7 +1045,8 @@ Sema::CheckPointerTypesForAssignment(QualType lhsType, QualType rhsType) { /// Sema::AssignmentCheckResult Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType) { - if (lhsType.getCanonicalType() == rhsType.getCanonicalType()) + if (lhsType.getCanonicalType().getUnqualifiedType() == + rhsType.getCanonicalType().getUnqualifiedType()) return Compatible; // common case, fast path... if (lhsType->isReferenceType() || rhsType->isReferenceType()) {