[clang] [Clang][NFC] Remove TemplateArgumentList::OnStack (PR #79760)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 30 11:07:54 PST 2024
================
@@ -301,7 +279,9 @@ class TemplateArgumentList final
unsigned size() const { return NumArguments; }
/// Retrieve a pointer to the template argument list.
- const TemplateArgument *data() const { return Arguments; }
+ const TemplateArgument *data() const {
+ return getTrailingObjects<TemplateArgument>();
+ }
----------------
sdkrystian wrote:
We definitely could, but perhaps that is outside the scope of this PR? That being said, It would be good to unify the interfaces of `TemplateArgumentList`, `TemplateArgumentListInfo`, and `ASTTemplateArgumentListInfo` by perhaps giving them all the following members:
- `begin()` and `end()`
- `operator[]`
- `operator ArrayRef<TemplateArgument>`/`operator ArrayRef<TemplateArgumentInfo>`
https://github.com/llvm/llvm-project/pull/79760
More information about the cfe-commits
mailing list