HomePhabricator

Implement if consteval (P1938)

Authored by cor3ntin on Oct 5 2021, 5:02 AM.

Description

Implement if consteval (P1938)

Modify the IfStmt node to suppoort constant evaluated expressions.

Add a new ExpressionEvaluationContext::ImmediateFunctionContext to
keep track of immediate function contexts.

This proved easier/better/probably more efficient than walking the AST
backward as it allows diagnosing nested if consteval statements.

Details

Committed
aaron.ballmanOct 5 2021, 5:04 AM
Parents
rGb5a11a991e17: [fir] Split FIROptimizer lib into several smaller libraries
Branches
Unknown
Tags
Unknown