aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-11-13 00:31:42 +0000
committerSteve Naroff <snaroff@apple.com>2007-11-13 00:31:42 +0000
commit8eabdffa942f22599f7626d85d16ff150fa164af (patch)
treedffa87f5c460264f1e975d0f2174b5b352e8169b
parent0f84c0059cec39fd1c73ac05bc2864dca664e7f4 (diff)
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
-rw-r--r--Sema/SemaExpr.cpp3
1 files changed, 2 insertions, 1 deletions
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()) {