summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-09 21:23:21 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-09 21:23:21 +0000
commitfdc82ccb3f2b23a89e7002fe8238e1422b00f96a (patch)
treef189aa0a3010e0eb212970b8eadf0a8b098985ea /lib/Parse/ParseDecl.cpp
parent6694ed095d6b27a2c92ec4fd63664fcd88a05749 (diff)
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index ba24adefe6b0..833d93e4548a 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -306,10 +306,11 @@ unsigned Parser::ParseAttributeArgsCommon(
// Parse the non-empty comma-separated list of expressions.
do {
- bool ShouldEnter = attributeParsedArgsUnevaluated(*AttrName);
+ bool Uneval = attributeParsedArgsUnevaluated(*AttrName);
EnterExpressionEvaluationContext Unevaluated(
- Actions, Sema::Unevaluated, /*LambdaContextDecl=*/nullptr,
- /*IsDecltype=*/false, ShouldEnter);
+ Actions, Uneval ? Sema::Unevaluated : Sema::ConstantEvaluated,
+ /*LambdaContextDecl=*/nullptr,
+ /*IsDecltype=*/false);
ExprResult ArgExpr(
Actions.CorrectDelayedTyposInExpr(ParseAssignmentExpression()));