Eli helped me understand how evaluation contexts work.
llvm-svn: 113642
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index f2cf784..1c2b343 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -898,6 +898,10 @@
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())