[clang] [BoundsSafety][NFC] Hold LateParsedTypeAttrInfo in declarator late-attribute lists (PR #239050)
Dan Liew via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 14:03:10 PST 2026
================
@@ -1544,10 +1544,11 @@ class Parser : public CodeCompletionHandler {
ArrayRef<const DeclRefExpr *> ParamRefs,
bool ReenteredProtoParams);
- /// Helper function to move LateParsedTypeAttribute pointers from one list
- /// to another. Filters type attributes from \p From and appends them to \p
- /// To.
- static void TakeTypeAttrsAppendingFrom(LateParsedAttrList &To,
+ /// Moves the late-parsed type attributes out of \p From, appending a pointer
+ /// to each one's LateParsedTypeAttrInfo to \p To. \p To does not own the
+ /// LateParsedTypeAttribute objects: the caller must keep them alive while
+ /// \p To is in use (in a C record, CurRecordLateParsedTypeAttrs does).
+ static void TakeTypeAttrsAppendingFrom(LateParsedTypeAttrInfoList &To,
----------------
delcypher wrote:
Nit: I feel like the name of this API should be something like `TakeLateParsedTypeAttrInfosFrom(...)`
https://github.com/llvm/llvm-project/pull/239050
More information about the cfe-commits
mailing list