C++: add support for C++17 fold expressions

This commit is contained in:
Nick Rolfe
2019-04-23 15:25:40 +01:00
parent 3905cf70f4
commit 4352a20be0
2 changed files with 66 additions and 0 deletions

View File

@@ -1432,6 +1432,7 @@ case @expr.kind of
| 129 = @new_array_expr
// ... 130 @objc_array_literal deprecated
// ... 131 @objc_dictionary_literal deprecated
| 132 = @foldexpr
// ...
| 200 = @ctordirectinit
| 201 = @ctorvirtualinit
@@ -1579,6 +1580,12 @@ lambda_capture(
@addressable = @function | @variable ;
@accessible = @addressable | @enumconstant ;
fold(
int expr: @foldexpr ref,
string operator: string ref,
boolean is_left_fold: boolean ref
);
stmts(
unique int id: @stmt,
int kind: int ref,