dblaikie added inline comments.

================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1938-1940
+    // The default value for the argument VD to the current function is
+    // nullptr. So we assert that VD is non null because we deref VD here.
+    assert(VD && "!VD");
----------------
Doesn't seem like the most informative comment or assertion string - the 
invariant  "isScopedVar implies VD is non-null" is established earlier in the 
function, where isScopedVar only becomes true under the "VD is non-null" 
condition at 1809.

Would it be better to improve whatever static analysis you're using to be able 
to track that correlation, rather than adding lots of extra assertions to LLVM? 
(can the Clang Static Analyzer understand this code and avoid warning on it, 
for instance - that'd be a good existence proof for such "smarts" being 
reasonably possible for static analysis)


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

https://reviews.llvm.org/D78853



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

Reply via email to