llvm-project/clang/lib/Parse
Steffen Larsen ead1690d31 Allow parameter pack expansions and initializer lists in annotate attribute
These changes make the Clang parser recognize expression parameter pack
expansion and initializer lists in attribute arguments. Because
expression parameter pack expansion requires additional handling while
creating and instantiating templates, the support for them must be
explicitly supported through the AcceptsExprPack flag.

Handling expression pack expansions may require a delay to when the
arguments of an attribute are correctly populated. To this end,
attributes that are set to accept these - through setting the
AcceptsExprPack flag - will automatically have an additional variadic
expression argument member named DelayedArgs. This member is not
exposed the same way other arguments are but is set through the new
CreateWithDelayedArgs creator function generated for applicable
attributes.

To illustrate how to implement support for expression pack expansion
support, clang::annotate is made to support pack expansions. This is
done by making handleAnnotationAttr delay setting the actual attribute
arguments until after template instantiation if it was unable to
populate the arguments due to dependencies in the parsed expressions.
2022-02-08 13:38:07 -05:00
..
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
ParseAST.cpp [Support] Add TimeTraceScope constructor without detail arg 2019-12-11 14:32:21 +00:00
ParseCXXInlineMethods.cpp [CodeCompletion] (mostly) fix completion in incomplete C++ ctor initializers. 2022-01-13 08:06:35 +01:00
ParseDecl.cpp Allow parameter pack expansions and initializer lists in annotate attribute 2022-02-08 13:38:07 -05:00
ParseDeclCXX.cpp [AST] Add more source information for DecltypeTypeLoc. 2022-01-10 09:34:18 +01:00
ParseExpr.cpp Allow parameter pack expansions and initializer lists in annotate attribute 2022-02-08 13:38:07 -05:00
ParseExprCXX.cpp Fix a failed assertion on an invalid typename requirement 2022-01-18 11:59:08 -05:00
ParseInit.cpp [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
ParseObjc.cpp [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
ParseOpenMP.cpp Enable inoutset dependency-type in depend clause. 2022-02-08 08:35:36 -05:00
ParsePragma.cpp [MS compat] Handle #pragma fenv_access like #pragma STDC FENV_ACCESS (PR50694) 2021-10-11 17:07:26 +02:00
ParseStmt.cpp [Parse] Use empty RecoveryExpr when if/while/do/switch conditions fail to parse 2022-01-10 10:38:27 +01:00
ParseStmtAsm.cpp [clang] Fix bugprone argument comments (NFC) 2022-01-09 00:19:49 -08:00
ParseTemplate.cpp [clang] Fix bugprone argument comments (NFC) 2022-01-09 00:19:49 -08:00
ParseTentative.cpp [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
Parser.cpp [clang] Fix bugprone argument comments (NFC) 2022-01-09 00:19:49 -08:00