steakhal added inline comments.

================
Comment at: 
clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp:151-164
+  auto ArgSVal = C.getSVal(E).getAs<DefinedOrUnknownSVal>();
+  if (!ArgSVal)
+    return;
+
+  ProgramStateRef StNonNull, StNull;
+  std::tie(StNonNull, StNull) = State->assume(*ArgSVal);
+
----------------
steakhal wrote:
> This means that we would raise an issue if `ArgSVal` might be null. We 
> usually warn if we are sure there is a bug, aka. if it must be null. 
> Consequently, the condition should be rather `StNull && !StNonNull` instead 
> of just `StNull`.
Ah I see now. My bad, thats the whole point of this :D


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152269

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to