diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index ba24adefe6b..833d93e4548 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/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())); |