vsavchenko marked 2 inline comments as done.
vsavchenko 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)
----------------
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?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp:537
+    // be considered non-null as annotated by the developer.
+    if (auto NewState = State->assume(*StoredVal, true)) {
+      Context.addTransition(NewState);
----------------
NoQ wrote:
> Ok, so we're continuing normally if the value is already known to have been 
> assigned to null. We could sink the analysis instead but presumably it's not 
> our job as another checker must have warned before we get there (let's 
> comment about this maybe).
Sure!


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

Reply via email to