[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 26 06:38:54 PDT 2024


https://github.com/NagyDonat commented:

Thanks for this improvement, I'm really happy to see this! (I added some inline comments, but they are all minor and tangential.)   

Right now all the `nullability.*` checkers are marked as (ObjC) in [the documentation](https://clang.llvm.org/docs/analyzer/checkers.html#nullability), because (as far as I know) previously they were only supporting the Objective-C style `_Nullable` and `_Nonnull` annotations.

However, as your change shows, the same "backend" can be used to handle different kinds of nullability annotations, which would make these checkers available for more users.

Please update the documentation of the affected checkers (in `clang/docs/analyzer/checkers.rst`) to mark that they are no longer limited to Objective-C.



https://github.com/llvm/llvm-project/pull/106048


More information about the cfe-commits mailing list