diff options
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index e2986a87a5..bf9f7a0bb3 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -110,7 +110,8 @@ 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().getCanonicalType() == Type.getCanonicalType()) return; + if (Context.getCanonicalType(Expr->getType()) == + Context.getCanonicalType(Type)) return; if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(Expr)) ImpCast->setType(Type); |