aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 82c8ea099d..cff01c6530 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2187,11 +2187,9 @@ bool Sema::CheckArithmeticConstantExpression(const Expr* Init) {
}
bool Sema::CheckForConstantInitializer(Expr *Init, QualType DclT) {
- Expr::EvalResult Result;
-
Init = Init->IgnoreParens();
- if (Init->Evaluate(Result, Context) && !Result.HasSideEffects)
+ if (Init->isEvaluatable(Context))
return false;
// Look through CXXDefaultArgExprs; they have no meaning in this context.