Created
February 19, 2025 21:25
-
-
Save a-tarasyuk/41b2a31bd2ae65f23b68aaeb29677aa3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| EnterExpressionEvaluationContext Eval( | |
| Actions, Sema::ExpressionEvaluationContext::ConstantEvaluated, | |
| /*LambdaContextDecl=*/ | |
| nullptr, | |
| /*ExprContext=*/ | |
| Sema::ExpressionEvaluationContextRecord::EK_Other, | |
| /*ShouldEnter=*/ | |
| CK == Sema::ConditionKind::ConstexprIf); | |
| // Parse the expression. | |
| Expr = ParseExpression(); // expression | |
| } | |
| if (Expr.isInvalid()) | |
| return Sema::ConditionError(); | |
| if (InitStmt && Tok.is(tok::semi)) { | |
| WarnOnInit(); | |
| * InitStmt = Actions.ActOnExprStmt(Expr.get()); | |
| ConsumeToken(); | |
| return ParseCXXCondition(nullptr, Loc, CK, MissingOK); | |
| } | |
| return Actions.ActOnCondition(getCurScope(), Loc, Expr.get(), CK, | |
| MissingOK); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment