summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-13 18:01:07 +0000
committerChris Lattner <sabre@nondot.org>2008-02-13 18:01:07 +0000
commit7b7ace5537784bdf43563377ef2982655c5549e8 (patch)
treeb962a025328522283d6e6f3e3c19407e4c88f45d
parent419df4e0663837c8caeead40e48c6eda60a4e5e5 (diff)
downloadbcm5719-llvm-7b7ace5537784bdf43563377ef2982655c5549e8.tar.gz
bcm5719-llvm-7b7ace5537784bdf43563377ef2982655c5549e8.zip
avoid making implicit casts that just remove typedefs.
llvm-svn: 47074
-rw-r--r--clang/Sema/Sema.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Sema/Sema.cpp b/clang/Sema/Sema.cpp
index ffa81a2736e..ff8e1824831 100644
--- a/clang/Sema/Sema.cpp
+++ b/clang/Sema/Sema.cpp
@@ -124,7 +124,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer)
/// 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);
OpenPOWER on IntegriCloud