From 8eabdffa942f22599f7626d85d16ff150fa164af Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Tue, 13 Nov 2007 00:31:42 +0000 Subject: [PATCH] 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 --- Sema/SemaExpr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) { -- 2.50.1