[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 04:28:32 PST 2024
================
@@ -278,7 +278,9 @@ class ExplodedNode : public llvm::FoldingSetNode {
/// Useful for explaining control flow that follows the current node.
/// If the statement belongs to a body-farmed definition, retrieve the
/// call site for that definition.
- const Stmt *getNextStmtForDiagnostics() const;
+ /// If skipPurge is true, skip the purge-dead-symbols nodes (that are often
+ /// inserted out-of-order by the endinge).
+ const Stmt *getNextStmtForDiagnostics(bool skipPurge) const;
----------------
Xazax-hun wrote:
I find it hard to justify why would we ever not skip those nodes, and if there is a fallout we need to deal with it independently. I would prefer us to do the right thing and always skip the purge nodes (unless we discover why is it not a good idea, in that case we can document our findings in the form of comments). Having logic in the code that we do not fully understand why we need is technical debt. So I'd prefer minimizing that.
https://github.com/llvm/llvm-project/pull/117863
More information about the cfe-commits
mailing list