aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sema/SemaExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 88a72eb982..36112e6488 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -1028,8 +1028,8 @@ Sema::CheckPointerTypesForAssignment(QualType lhsType, QualType rhsType) {
///
Sema::AssignmentCheckResult
Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType) {
- if (lhsType == rhsType) // common case, fast path...
- return Compatible;
+ if (lhsType.getCanonicalType() == rhsType.getCanonicalType())
+ return Compatible; // common case, fast path...
if (lhsType->isReferenceType() || rhsType->isReferenceType()) {
if (Context.referenceTypesAreCompatible(lhsType, rhsType))