aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-26 22:17:49 +0000
committerChris Lattner <sabre@nondot.org>2008-07-26 22:17:49 +0000
commitb77792eabf5882cf9af8cc810599b20432fda6c2 (patch)
treeb3b695e135c5fa6692bdfc0c1da441140d64e2e5 /lib/Sema/Sema.cpp
parent806954b069dc1895353d4bd4f51e410869ac62f8 (diff)
change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp3
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);