[llvm-branch-commits] [clang] [BoundsSafety] support counted_by family on function parameters (PR #230538)
Mohammed Ashraf via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 23 08:53:35 PDT 2026
================
@@ -6768,8 +6768,8 @@ void Parser::ParseDeclaratorInternal(Declarator &D,
// a free-function prototype (e.g. `void f(int *__counted_by(n), int n)`)
// has no record to complete into, and late-parsing there would leave a
// CountAttributedType with a null count in the AST. Such parameters fall
- // back to eager handling instead. A function-pointer parameter inside a
- // struct field is still late-parsed, since that record completes it.
+ // back to eager handling instead, as do those of a function-pointer field:
+ // ParseFunctionDeclarator hides the record from the parameter clause.
----------------
Holo-xy wrote:
it was a fix for yeoul's stack that tripped one of the tests I added.
forgot to take it out.
https://github.com/llvm/llvm-project/pull/230538
More information about the llvm-branch-commits
mailing list