[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 04:18:13 PST 2024


================
@@ -347,8 +347,11 @@ const Stmt *ExplodedNode::getStmtForDiagnostics() const {
   return nullptr;
 }
 
-const Stmt *ExplodedNode::getNextStmtForDiagnostics() const {
+const Stmt *ExplodedNode::getNextStmtForDiagnostics(bool skipPurge) const {
   for (const ExplodedNode *N = getFirstSucc(); N; N = N->getFirstSucc()) {
+    if (skipPurge && N->getLocation().isPurgeKind()) {
----------------
necto wrote:

fixed:
4555ae3fb402 [NFC] Remove curly braces around a single-statement block


https://github.com/llvm/llvm-project/pull/117863


More information about the cfe-commits mailing list