[cfe-commits] r47074 - /cfe/trunk/Sema/Sema.cpp
Chris Lattner
sabre at nondot.org
Wed Feb 13 10:01:07 PST 2008
Author: lattner
Date: Wed Feb 13 12:01:07 2008
New Revision: 47074
URL: http://llvm.org/viewvc/llvm-project?rev=47074&view=rev
Log:
avoid making implicit casts that just remove typedefs.
Modified:
cfe/trunk/Sema/Sema.cpp
Modified: cfe/trunk/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/Sema.cpp?rev=47074&r1=47073&r2=47074&view=diff
==============================================================================
--- cfe/trunk/Sema/Sema.cpp (original)
+++ cfe/trunk/Sema/Sema.cpp Wed Feb 13 12:01:07 2008
@@ -124,7 +124,7 @@
/// ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
/// If there is already an implicit cast, merge into the existing one.
void Sema::ImpCastExprToType(Expr *&Expr, QualType Type) {
- if (Expr->getType() == Type) return;
+ if (Expr->getType().getCanonicalType() == Type.getCanonicalType()) return;
if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(Expr))
ImpCast->setType(Type);
More information about the cfe-commits
mailing list