]> granicus.if.org Git - clang/commitdiff
when checking for type equality, ignore typedefs.
authorChris Lattner <sabre@nondot.org>
Mon, 29 Oct 2007 05:15:40 +0000 (05:15 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 29 Oct 2007 05:15:40 +0000 (05:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43441 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index 88a72eb982884ed834c95fd40541981a572796db..36112e6488b993021dada136a8a4cf8688157e11 100644 (file)
@@ -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))