]> granicus.if.org Git - clang/commitdiff
Fix Sema::CheckAssignmentConstraints() to operate on the canonical, unqualified type.
authorSteve Naroff <snaroff@apple.com>
Tue, 13 Nov 2007 00:31:42 +0000 (00:31 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 13 Nov 2007 00:31:42 +0000 (00:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44036 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index 8f816e67ef42e9a5bfede4a0db529e228e76f601..976069e669d586f2f8bf3c3b7ebfd6fea44db63f 100644 (file)
@@ -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()) {