summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 8ec58d4283d..22242a5acc9 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -10619,17 +10619,8 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy,
switch (ConvTy) {
case Compatible:
- // See if a proper null pointer constant is to be assigned.
- if (DstType->isAnyPointerType() && !SrcType->isAnyPointerType() &&
- SrcExpr->isNullPointerConstant(Context,
- Expr::NPC_NeverValueDependent) ==
- Expr::NPCK_ZeroExpression &&
- !isUnevaluatedContext())
- Diag(SrcExpr->getExprLoc(), diag::warn_non_literal_null_pointer)
- << DstType << SrcExpr->getSourceRange();
-
- DiagnoseAssignmentEnum(DstType, SrcType, SrcExpr);
- return false;
+ DiagnoseAssignmentEnum(DstType, SrcType, SrcExpr);
+ return false;
case PointerToInt:
DiagKind = diag::ext_typecheck_convert_pointer_int;
OpenPOWER on IntegriCloud