aboutsummaryrefslogtreecommitdiff
path: root/clang/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
commitc190f96b7dbd1c3462a3cf7bd5faa6fb9866424d (patch)
tree6cb5f5690edf6968de12b262dc5f2959c8a826ef /clang/lib/AST/ExprConstant.cpp
parent899a75cefe941d44efed81b8e78de800205c8707 (diff)
downloadllvm-c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d.zip
llvm-c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d.tar.gz
llvm-c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d.tar.bz2
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
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 5e6a629..4d08053 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;