summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-23 14:50:21 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-23 14:50:21 +0000
commitd6aff018d446f22be4e4e0277080ebfa5b157288 (patch)
tree64b43af65e97f7659637c9ac028e39af2e26b841 /lib/Parse/ParseExpr.cpp
parentb897c8660c4ff7037dde81b9645737bc1c992abe (diff)
Notes
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 4a07d05650bd..13b32acd5b29 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -279,7 +279,8 @@ Parser::OwningExprResult Parser::ParseConstantExpression() {
// C++ [basic.def.odr]p2:
// An expression is potentially evaluated unless it appears where an
// integral constant expression is required (see 5.19) [...].
- EnterUnevaluatedOperand Unevaluated(Actions);
+ EnterExpressionEvaluationContext Unevaluated(Actions,
+ Action::Unevaluated);
OwningExprResult LHS(ParseCastExpression(false));
if (LHS.isInvalid()) return move(LHS);
@@ -983,7 +984,8 @@ Parser::ParseExprAfterTypeofSizeofAlignof(const Token &OpTok,
//
// The GNU typeof and alignof extensions also behave as unevaluated
// operands.
- EnterUnevaluatedOperand Unevaluated(Actions);
+ EnterExpressionEvaluationContext Unevaluated(Actions,
+ Action::Unevaluated);
Operand = ParseCastExpression(true/*isUnaryExpression*/);
} else {
// If it starts with a '(', we know that it is either a parenthesized
@@ -999,7 +1001,8 @@ Parser::ParseExprAfterTypeofSizeofAlignof(const Token &OpTok,
//
// The GNU typeof and alignof extensions also behave as unevaluated
// operands.
- EnterUnevaluatedOperand Unevaluated(Actions);
+ EnterExpressionEvaluationContext Unevaluated(Actions,
+ Action::Unevaluated);
Operand = ParseParenExpression(ExprType, true/*stopIfCastExpr*/,
CastTy, RParenLoc);
CastRange = SourceRange(LParenLoc, RParenLoc);