[PATCH] D77722: [analyzer] Do not report NSError null dereference for _Nonnull params
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 06:29:03 PDT 2020
NoQ added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp:521
+ // Annotations that we want to consider make sense only for types.
+ auto Region = dyn_cast_or_null<TypedValueRegion>(Location.getAsRegion());
+ if (!Region)
----------------
vsavchenko wrote:
> NoQ wrote:
> > [[ https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable | Too much `auto` ]]!
> But this auto is also fine IMO as you can clearly see the actual type in the RHS. Mb `const auto *Region` at least?
Yup, this one should be `const auto *`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77722/new/
https://reviews.llvm.org/D77722
More information about the cfe-commits
mailing list