diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-09-10 21:57:27 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-09-10 21:57:27 +0000 |
commit | bd7c849de9a1647b235597681c3983ba1e8c6c8b (patch) | |
tree | adecdc8b4df9e799699b59b0b4590526d35aab09 /lib/Parse/ParseExpr.cpp | |
parent | b08fab82a68f6c1588ecd12ae2c6399cc5ea662d (diff) |
Eli helped me understand how evaluation contexts work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index f2cf78492c..1c2b343141 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -898,6 +898,10 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "noexcept")) return ExprError(); + // C++ [expr.unary.noexcept]p1: + // The noexcept operator determines whether the evaluation of its operand, + // which is an unevaluated operand, can throw an exception. + EnterExpressionEvaluationContext Unevaluated(Actions, Sema::Unevaluated); ExprResult Result = ParseExpression(); SourceLocation RParen = MatchRHSPunctuation(tok::r_paren, LParen); if (!Result.isInvalid()) |