]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: fix missing return in compatible_epath_p
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 14 Sep 2023 20:28:45 +0000 (16:28 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 14 Sep 2023 20:28:45 +0000 (16:28 -0400)
gcc/analyzer/ChangeLog:
* diagnostic-manager.cc (compatible_epath_p): Fix missing return.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/diagnostic-manager.cc

index a010f4ba1e1da2f30b31bcd19d92b3bca2256164..b3da2a982f2f553cb1f5e222dc2e222165a98c6e 100644 (file)
@@ -966,6 +966,14 @@ compatible_epath_p (const exploded_path *lhs_path,
       /* A superedge was found for only one of the two paths.  */
       return false;
     }
+
+  /* A superedge was found for only one of the two paths.  */
+  if (lhs_eedge_idx >= 0 || rhs_eedge_idx >= 0)
+    return false;
+
+  /* Both paths were drained up entirely.
+     No discriminant was found.  */
+  return true;
 }