diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-13 18:01:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-13 18:01:07 +0000 |
commit | 438757c55f6d9f4042724a91fccd0d7ac908d5da (patch) | |
tree | 7988989c9eaffd9e483b4e532a8fcefad046ea82 | |
parent | 0ee257148423fb8d22d232f97f456abaa338a949 (diff) |
avoid making implicit casts that just remove typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47074 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Sema/Sema.cpp | 2 |
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); |