[cfe-commits] r43441 - /cfe/trunk/Sema/SemaExpr.cpp

Chris Lattner sabre at nondot.org
Sun Oct 28 22:15:40 PDT 2007


Author: lattner
Date: Mon Oct 29 00:15:40 2007
New Revision: 43441

URL: http://llvm.org/viewvc/llvm-project?rev=43441&view=rev
Log:
when checking for type equality, ignore typedefs.

Modified:
    cfe/trunk/Sema/SemaExpr.cpp

Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=43441&r1=43440&r2=43441&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Mon Oct 29 00:15:40 2007
@@ -1028,8 +1028,8 @@
 ///
 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))





More information about the cfe-commits mailing list