-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
This issue was copied from checkedc/checkedc-clang#205
Checked C allows return bounds expression for functions to use the keyword _Return_value to denote the return value of a function. It can be used in bounds expressions and bounds can be declared for it.
The proposed work items are:
- Extend the IR with a way to represent Return_value and Current_expr_value The like approach is to create a new kind of expression similar to PositionalParameterExpr, that is used only in bounds expressions.
- Extend the syntax to allow them to be parsed where an identifier can be parsed. Construct the new IR expression to represent it.
- _Return_value should only be allowed in the context of parsing a return bounds expression.
- Current_expr_value should only be allowed in the context of parsing a bounds expression (excluding a return bounds expression).
Note that I need the IR representation for _Current_expr_value soon (in the next few days), so if anyone picks this up soon, they should coordinate the IR work me.