Similar and from an example of usage,
Safer Range Access
How about 2 attributes?
[[safe]]
[[unsafe(reason=["range", "dangling_reference", "reference_invalidation"], alternatives=["function signature", "function signature"])]]
The problem with the NO arguments of linters and static analysis apart from the language is that there are NO standard separate linters and static analyzer tools.
So what is being asked for is for the standard to standardize attributes that could be used by non standard tools.
2nd: For the standard to consider adding separate or [later] built into compiler these tools. There is a tools study group.
The purpose of this is for auditing, documentation and specification purposes.
A tool, if provided, wherever provided, would output a report in a standard easily parsable format such as JSON providing information such as the following:
1) #lines of code before include
2) #lines of code after include
3) how many functions unattributed
4) number of safe calls
5) number of unsafe calls per reason
In short:
This proposal is 0 overhead and doesn't break backwards compatibility because no assembly is generated.
The first phase could be quickly done because how long does it take to standardize 2 documentation attributes.
...
...
...
Other attributes could also be standardized for auditing, documentation and specification purposes at little cost to the current standardization effort. Using the information could come later.
Reference checking