[clang] [BoundsSafety][NFC] Add the count-refill logic for late-parsed bounds attributes (PR #224556)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 12:50:17 PDT 2026
================
@@ -2538,6 +2538,28 @@ class Sema final : public SemaBase {
bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes,
bool OrNull);
+ /// Late-parsed bounds types dropped while their declarator was built. The
+ /// attribute has already been diagnosed and its node is no longer part of
+ /// any type, so the completion pass must skip it rather than parse its
+ /// argument and complete it.
+ llvm::SmallPtrSet<const BoundsAttributedType *, 4>
----------------
erichkeane wrote:
Ah, interesting, I could swear that we got all of them!
So we would want to make this big enough to cover 'most of the time'. '1' would only be valid if there is almost always only 0 or 1 of these. What sort of thoughts do you have on the size here? Why did you choose 1?
https://github.com/llvm/llvm-project/pull/224556
More information about the cfe-commits
mailing list