aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-01 00:10:29 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-01 00:10:29 +0000
commit86c05f3f28bcf07c97dfb1881686fc43be2f47c2 (patch)
tree342fce9d2afec3117e45d47ba3f52ec76f534b28 /lib/Sema/Sema.cpp
parent293a45e724a15fb58b8805a5791f9f3aee769cf6 (diff)
Perform the bad-address-space conversions check as part of
CheckPointerTypesForAssignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 1fd12d3b7a..eda88881a4 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -206,15 +206,6 @@ void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty,
if (ExprTy == TypeTy)
return;
- if (Expr->getType()->isPointerType() && Ty->isPointerType()) {
- QualType ExprBaseType = cast<PointerType>(ExprTy)->getPointeeType();
- QualType BaseType = cast<PointerType>(TypeTy)->getPointeeType();
- if (ExprBaseType.getAddressSpace() != BaseType.getAddressSpace()) {
- Diag(Expr->getExprLoc(), diag::err_implicit_pointer_address_space_cast)
- << Expr->getSourceRange();
- }
- }
-
// If this is a derived-to-base cast to a through a virtual base, we
// need a vtable.
if (Kind == CK_DerivedToBase &&