================
@@ -1202,6 +1202,55 @@ StmtResult Parser::ParseCompoundStatementBody(bool
isStmtExpr) {
continue;
}
+ // Annotation token that tells the parser to build the 'begin' and 'end'
+ // declarations for an iterating expansion statement; this is used inside
+ // the lambda that computes the expansion size (see also
+ // Sema::ComputeExpansionSize()).
+ //
+ // The annotation token is followed by 2 identifier tokens, which indicate
+ // the variable names for the begin and end variable, respectively.
+ //
+ // We handle this here because this results in *two* statements, not one,
+ // and moreover, this annotation token shouldn't appear in any other
context
+ // anyway.
+ //
+ // The reason this is a single annotation token is that the code that
builds
+ // 'begin' and 'end' only supports building both at once.
+ if (Tok.is(tok::annot_expansion_stmt_declare_begin_end)) {
+ auto *RangeVarDecl = static_cast<VarDecl *>(Tok.getAnnotationValue());
----------------
cor3ntin wrote:
why isn't that just reusing `annotation_value_decl` ?
https://github.com/llvm/llvm-project/pull/208877
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits