[clang] Attach resource attributes to handle within record, instead of record (PR #101433)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 13:02:44 PDT 2024
================
@@ -81,6 +81,7 @@ struct BuiltinTypeDeclBuilder {
BuiltinTypeDeclBuilder &
addMemberVariable(StringRef Name, QualType Type,
+ const llvm::SmallVector<Attr *, 2> &Attrs,
----------------
bogner wrote:
Generally you don't want to pass the `SmallVector` template to a function. If you need to modify it there's `SmallVectorImpl`, but in cases like this where you're just going to read it you can use `ArrayRef`:
```suggestion
llvm::ArrayRef<Attr *> Attrs,
```
https://github.com/llvm/llvm-project/pull/101433
More information about the cfe-commits
mailing list