summaryrefslogtreecommitdiff
path: root/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
commit3ccd6a7756d79c37243756b8078cb2153ea4ec7d (patch)
tree92345766e14a5ab2ea373d11a23da2479df526d0 /lib/CodeGen/CGExprAgg.cpp
parenta577b1192b8dfc546afca827ddba87c006d9286a (diff)
downloadclang-3ccd6a7756d79c37243756b8078cb2153ea4ec7d.tar.gz
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." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 3b1c5bf876..a76058c147 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/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;