summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-11-03 02:23:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-11-03 02:23:33 +0000
commit35018958637384423c1f8a48628c8f3f8dea23c5 (patch)
treed7bb426a5653b3e26093680054b15c90442da7b8 /clang/lib/CodeGen/CGExprScalar.cpp
parentc39b97f2112e015cd463ddc434945ba04dba687d (diff)
downloadbcm5719-llvm-35018958637384423c1f8a48628c8f3f8dea23c5.tar.gz
bcm5719-llvm-35018958637384423c1f8a48628c8f3f8dea23c5.zip
Revert r345562: "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type"
This exposes a (known) CodeGen bug: it can't cope with emitting lvalue expressions that denote non-odr-used but usable-in-constant-expression variables. See PR39528 for a testcase. Reverted for now until that issue can be fixed. llvm-svn: 346065
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index c77f1bab5b1..519606e8214 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -2072,14 +2072,14 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
case CK_NullToPointer:
if (MustVisitNullValue(E))
- CGF.EmitIgnoredExpr(E);
+ (void) Visit(E);
return CGF.CGM.getNullPointer(cast<llvm::PointerType>(ConvertType(DestTy)),
DestTy);
case CK_NullToMemberPointer: {
if (MustVisitNullValue(E))
- CGF.EmitIgnoredExpr(E);
+ (void) Visit(E);
const MemberPointerType *MPT = CE->getType()->getAs<MemberPointerType>();
return CGF.CGM.getCXXABI().EmitNullMemberPointer(MPT);
OpenPOWER on IntegriCloud