vsavchenko added a comment. In D77722#1969391 <https://reviews.llvm.org/D77722#1969391>, @Szelethus wrote:
> In D77722#1969261 <https://reviews.llvm.org/D77722#1969261>, @vsavchenko > wrote: > > > Hi everyone! > > I'm thinking about adding support for `__attribute((nonnull))__` as well, > > but it should be handled a bit differently. That annotation is for > > parameters and not for types, so the corresponding constraints should be > > generated only when entering the function (as opposed to each load). I'm > > not sure that it should be a part of this commit though because it will > > have a completely standalone solution. Another question about > > `__attribute((nonnull))__` is "Where should we put it?". It is quite > > reasonable to put it into `NullabilityChecker`, but `NonnullParamChecker` > > seems like a good candidate as well. > > > Wait, we don't already assume `nonnull` attributed parameters as, well, not > null? That's crazy. Yep, I was shocked by it as well. Maybe for some warnings it is checked in the end and they are truncated before reporting. However, DereferenceChecker definitely dispatches `ImplicitNullDerefEvent` for params marked with `__attribute__((nonnull))`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77722/new/ https://reviews.llvm.org/D77722 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits