[PATCH] D103644: [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 11 01:35:11 PDT 2021


vsavchenko added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:2047
+
+    // TODO: get rid of it.
+    const DeclStmt *DS = nullptr;
----------------
NoQ wrote:
> WDYM?
> 
> Also maybe downscope it?
I meant that the only client for it is undef value printer and we can probably get rid of it altogether, or at least what I did in the very last patch from the stack.


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:2063
+                                         : "Captured by block as ";
+      showBRDiagnostics(Action, OS, SI.Dest, SI.Value, SI.Origin, DS);
+      break;
----------------
NoQ wrote:
> Isn't `DS` always null here?
Duh!  Yes!
Good catch, I'll remove DS declaration!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103644



More information about the cfe-commits mailing list