From c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 2 May 2017 01:06:16 +0000 Subject: 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. llvm-svn: 301891 --- clang/lib/AST/ExprConstant.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'clang/lib') diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 5e6a629c01b..4d0805323e5 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/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; -- cgit v1.2.3