[PATCH] D66473: [analyzer] Removed some dead code in BugReporter and related files

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 20 11:55:47 PDT 2019


Szelethus added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2343
   InterExplodedGraphMap ForwardMap;
-  TrimmedGraph = OriginalGraph->trim(Nodes, &ForwardMap, &InverseMap);
 
----------------
gribozavr wrote:
> NoQ wrote:
> > Btw these days we strongly suspect that the whole graph trimming thing is useless and should be removed.
> TBH, I don't understand what this code is doing, I was just following the leads from dead code analysis :)
TL;DR: When creating a linear path from the root of the `ExplodedGraph` to a given error node (a point at which a bug was emitted), we first trim be graph of all nodes that do not lead to an error node, and then create the path from that, instead of skipping the entire trimming process.

This isn't that simple (though probably not that difficult either), so feel free to leave it as it, the code is already much easier to read!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66473





More information about the cfe-commits mailing list