llvm / llvm/llvm-project

Extend `counted_by` support beyond struct fields

Open
#167,365 8 comments 0 reactions 0 assignees View on GitHub
clang:bounds-safety
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Currently, `counted_by` and related attributes are only supported in struct fields. This issue tracks extending support to:

- Function parameters
- Return types
- Global variables
- Local variables

For `typedef`, support would only make sense if the attribute argument is a constexpr or constant literal.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing counted_by and related-attribute support for struct fields. Then examine how function parameters, return types, global variables, local variables, and typedefs are represented; done means support covers the listed declaration kinds while typedef arguments remain limited to constexpr or constant literals.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.