[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 8 02:11:10 PDT 2022


steakhal added a comment.

You have a single bool property, yet you allow to enable/disable this by each sub-checker. It feels like the last checker in the registration process will rule them all.

That being said, in the fixit creation scope, you check for both this flag and the presence of the fixit location - which you only set if the flag is active.

IMO you should have this flag per-subchecker, and check for the presence of that and either pass the fixit location if you actually need to insert the fixit or pass it unconditionally and emit the fixit only if the flag of the given sub-checker is set.

Also, make sure the tests pass.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123352/new/

https://reviews.llvm.org/D123352



More information about the cfe-commits mailing list