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

Moshe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 20 13:34:52 PDT 2022


MosheBerman added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp:162-164
+  /// 2. If we are annotating an Objective-C method, and not a function, we
+  ///    want to use the `nullable` form instead of `_Nullable`.
+  ///    When \p SyntaxSugar is true, we handle the second case.
----------------
steakhal wrote:
> You could pass the owning Decl to this function and directly figure out if it's an objc method or not.
We do this at the callsite. Does it matter where we do the check?


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