diff options
author | Chris Lattner <sabre@nondot.org> | 2007-10-29 05:15:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-10-29 05:15:40 +0000 |
commit | 84d35ce5c32a51113913adc684c6d825020b03e9 (patch) | |
tree | 77105ca44f1cecd6b4e4d46e88076cc4019e7f75 | |
parent | b96728d90abc35a520798066d2a75ca36400a617 (diff) |
when checking for type equality, ignore typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43441 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Sema/SemaExpr.cpp | 4 |
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)) |