[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Thu May 15 06:31:41 PDT 2025
================
@@ -2633,7 +2633,8 @@ BugPathGetter::BugPathGetter(const ExplodedGraph *OriginalGraph,
assert(I->isValid() &&
"We only allow BugReporterVisitors and BugReporter itself to "
"invalidate reports!");
- Nodes.emplace_back(I->getErrorNode());
+ if (const ExplodedNode *ErrNode = I->getErrorNode())
----------------
NagyDonat wrote:
Yes, I looked into it and you're right, it cannot be null. I eliminated the conditional and clarified the situation in commit https://github.com/llvm/llvm-project/pull/139939/commits/f6b4ef520af22f8437b8b6423e68dcfae81c8690 . Thanks for the tip!
https://github.com/llvm/llvm-project/pull/139939
More information about the cfe-commits
mailing list