aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sema/Sema.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sema/Sema.cpp b/Sema/Sema.cpp
index ffa81a2736..ff8e182483 100644
--- a/Sema/Sema.cpp
+++ b/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);