summaryrefslogtreecommitdiffstats
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2017-05-02 01:06:16 +0000
committerNick Lewycky <nicholas@mxc.ca>2017-05-02 01:06:16 +0000
commit5ae2db8f76e75b5e20ddeff8d250c9ba8bb4e05b (patch)
treed9f3428be64382bdee0b8b299f43ac6032a426cd /lib/AST/ExprConstant.cpp
parent51b642c4827997ad34d2de86f9a240d6427a603c (diff)
Revert r301785 (and r301787) because they caused PR32864.
The fix is that ExprEvaluatorBase::VisitInitListExpr should handle transparent exprs instead of exprs with one element. Fixing that uncovers one testcase failure because the AST for "constexpr _Complex float test2 = {1};" is wrong (the _Complex prvalue should not be const-qualified), and a number of test failures in test/OpenMP where the captured stmt contains an InitListExpr that is in syntactic form. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 5e6a629c01..4d0805323e 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -2186,9 +2186,6 @@ static bool HandleLValueBase(EvalInfo &Info, const Expr *E, LValue &Obj,
if (!Base->isVirtual())
return HandleLValueDirectBase(Info, E, Obj, DerivedDecl, BaseDecl);
- if (!Obj.checkNullPointer(Info, E, CSK_Base))
- return false;
-
SubobjectDesignator &D = Obj.Designator;
if (D.Invalid)
return false;
@@ -9946,11 +9943,8 @@ static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result) {
if (E->getType().isNull())
return false;
- if (!CheckLiteralType(Info, E)) {
- if (Info.noteFailure())
- EvaluateIgnoredValue(Info, E);
+ if (!CheckLiteralType(Info, E))
return false;
- }
if (!::Evaluate(Result, Info, E))
return false;