/* Emit a warning at any call to "__analyzer_dump_exploded_nodes",
giving the number of processed exploded nodes for "before-stmt",
- and the IDs of processed and merger enodes.
+ and the IDs of processed, merger, and worklist enodes.
We highlight the count of *processed* enodes since this is of most
interest in DejaGnu tests for ensuring that state merger has
happened.
- We don't show the count of merger enodes, as this is more of an
- implementation detail of the merging that we don't want to bake
- into our expected DejaGnu messages. */
+ We don't show the count of merger and worklist enodes, as this is
+ more of an implementation detail of the merging/worklist that we
+ don't want to bake into our expected DejaGnu messages. */
unsigned i;
exploded_node *enode;
auto_vec<exploded_node *> processed_enodes;
auto_vec<exploded_node *> merger_enodes;
+ auto_vec<exploded_node *> worklist_enodes;
/* This is O(N^2). */
unsigned j;
exploded_node *other_enode;
{
default:
gcc_unreachable ();
+ case exploded_node::STATUS_WORKLIST:
+ worklist_enodes.safe_push (other_enode);
+ break;
case exploded_node::STATUS_PROCESSED:
processed_enodes.safe_push (other_enode);
break;
pp_string (&pp, "] merger(s): [");
print_enode_indices (&pp, merger_enodes);
}
+ if (worklist_enodes.length () > 0)
+ {
+ pp_string (&pp, "] worklist: [");
+ print_enode_indices (&pp, worklist_enodes);
+ }
pp_character (&pp, ']');
warning_n (stmt->location, 0, processed_enodes.length (),
--- /dev/null
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=2 -Wno-analyzer-too-complex" } */
+
+#include "analyzer-decls.h"
+
+int test (int a)
+{
+ if (a != 42 && a != 113) {
+ return (-2);
+ }
+
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+
+ return 0;
+}
+
+int test_2 (int a)
+{
+ if (a != 42 && a != 113 && a != 666) {
+ return (-2);
+ }
+
+ __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
+
+ return 0;
+}