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 8f816e6..976069e 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1045,7 +1045,8 @@
 ///
 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()) {