summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-06-14 04:05:17 +0000
committerNico Weber <nicolasweber@gmx.de>2019-06-14 04:05:17 +0000
commit3d02b895eda08dda749a16c9499f3a11fd68793b (patch)
treeda36d6a87461e67af138453afafe5ffafd45d02b /clang/lib/CodeGen/CGExprAgg.cpp
parent5b4285d82ded14b5f486df39fbef6aacdfbd8659 (diff)
downloadbcm5719-llvm-3d02b895eda08dda749a16c9499f3a11fd68793b.tar.gz
bcm5719-llvm-3d02b895eda08dda749a16c9499f3a11fd68793b.zip
Revert 363295, it caused PR42276. Also revert follow-ups 363337, 363340.
Revert 363340 "Remove unused SK_LValueToRValue initialization step." Revert 363337 "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type" Revert 363295 "C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression." llvm-svn: 363352
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprAgg.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp
index 3b1c5bf876e..a76058c1472 100644
--- a/clang/lib/CodeGen/CGExprAgg.cpp
+++ b/clang/lib/CodeGen/CGExprAgg.cpp
@@ -1352,8 +1352,7 @@ static bool isSimpleZero(const Expr *E, CodeGenFunction &CGF) {
// (int*)0 - Null pointer expressions.
if (const CastExpr *ICE = dyn_cast<CastExpr>(E))
return ICE->getCastKind() == CK_NullToPointer &&
- CGF.getTypes().isPointerZeroInitializable(E->getType()) &&
- !E->HasSideEffects(CGF.getContext());
+ CGF.getTypes().isPointerZeroInitializable(E->getType());
// '\0'
if (const CharacterLiteral *CL = dyn_cast<CharacterLiteral>(E))
return CL->getValue() == 0;
OpenPOWER on IntegriCloud