program_points.dot 4.95 KB
// RUN: %exploded_graph_rewriter %s | FileCheck %s

// CHECK: <b>Program points:</b>
// CHECK-SAME: <table border="0" align="left" width="0">
// CHECK-SAME:   <tr>
// CHECK-SAME:     <td width="0">
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left" width="0">
// CHECK-SAME:       <font color="gold3">BlockEdge</font>
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left">
// CHECK-SAME:     [B0] -&gt; [B1]
// CHECK-SAME:     </td>
// CHECK-SAME:   </tr>
// CHECK-SAME:   <tr>
// CHECK-SAME:     <td width="0">
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left" width="0">
// CHECK-SAME:       <font color="gold3">BlockEntrance</font>
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left">
// CHECK-SAME:     [B1]
// CHECK-SAME:     </td>
// CHECK-SAME:   </tr>
// CHECK-SAME: </table>
Node0x1 [shape=record,label=
 "{
    {
      "state_id": 0, "program_state": null, "program_points": [
      {
        "kind": "Edge",
        "src_id": 0,
        "dst_id": 1,
        "terminator": null,
        "term_kind": null,
        "tag": null,
        "node_id": 1,
        "has_report": 0,
        "is_sink": 0
      },
      {
        "kind": "BlockEntrance",
        "block_id": 1,
        "terminator": null,
        "term_kind": null,
        "tag": null,
        "node_id": 2,
        "has_report": 0,
        "is_sink": 0
      }
    ]}
\l}"];

// CHECK-NEXT: <b>Program point:</b>
// CHECK-SAME: <table border="0" align="left" width="0">
// CHECK-SAME:   <tr>
// CHECK-SAME:     <td align="left" width="0">
// CHECK-SAME:       main.cpp:<b>4</b>:<b>5</b>:
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left" width="0">
// CHECK-SAME:       <font color="cyan4">DeclRefExpr</font>
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left"><i>S3</i></td>
// CHECK-SAME:     <td align="left">
// CHECK-SAME:       <font color="cyan3">PreStmt</font>
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left">x</td>
// CHECK-SAME:   </tr>
// CHECK-SAME:   <tr>
// CHECK-SAME:     <td width="0">
// CHECK-SAME:     </td>
// CHECK-SAME:     <td colspan="3" align="left">
// CHECK-SAME:       <b>Tag: </b>
// CHECK-SAME:       <font color="crimson">ExprEngine : Clean Node</font>
// CHECK-SAME:     </td>
// CHECK-SAME:   </tr>
// CHECK-SAME: </table>
Node0x3 [shape=record,label=
 "{
    { "state_id": 0, "program_state": null, "program_points": [
      {
        "kind": "Statement",
        "stmt_kind": "DeclRefExpr",
        "stmt_point_kind": "PreStmt",
        "stmt_id": 3,
        "pointer": "0x3",
        "pretty": "x",
        "location": {
          "file": "main.cpp",
          "line": 4,
          "column": 5
        },
        "tag": "ExprEngine : Clean Node",
        "node_id": 3,
        "pointer": "0x3",
        "has_report": 0,
        "is_sink": 0
      }
    ]}
\l}"];

// Test collapsing large pretty prints with braces.

// CHECK-NEXT: <b>Program point:</b>
// CHECK-SAME: <td align="left">\{ ... \}</td>
Node0x4 [shape=record,label=
 "{
    {
      "state_id": 0, "program_state": null, "program_points": [
      {
        "kind": "Statement",
        "stmt_kind": "CompoundStmt",
        "stmt_point_kind": "PostStmt",
        "stmt_id": 6,
        "pointer": "0x6",
        "pretty": "{ very very very very very very long pretty print }",
        "location": {
          "line": 7,
          "column": 8
        },
        "tag": "ExprEngine : Clean Node",
        "node_id": 4,
        "has_report": 0,
        "is_sink": 0
      }
    ]}
\l}"];

// CHECK-NEXT: <b>Program point:</b>
// CHECK-SAME: <table border="0" align="left" width="0">
// CHECK-SAME:   <tr>
// CHECK-SAME:     <td align="left" width="0">
// CHECK-SAME:       main.cpp:<b>8</b>:<b>9</b>:
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left" width="0">
// CHECK-SAME:       <font color="cyan4">
// CHECK-SAME:         ImplicitCastExpr (LValueToRValue)
// CHECK-SAME:       </font>
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left"><i>S5</i></td>
// CHECK-SAME:     <td align="left">
// CHECK-SAME:       <font color="cyan3">PreStmt</font>
// CHECK-SAME:     </td>
// CHECK-SAME:     <td align="left">y</td>
// CHECK-SAME:   </tr>
// CHECK-SAME:   <tr>
// CHECK-SAME:     <td width="0">
// CHECK-SAME:     </td>
// CHECK-SAME:     <td colspan="3" align="left">
// CHECK-SAME:       <b>Tag: </b>
// CHECK-SAME:       <font color="crimson">ExprEngine : Clean Node</font>
// CHECK-SAME:     </td>
// CHECK-SAME:   </tr>
// CHECK-SAME: </table>
Node0x5 [shape=record,label=
 "{
    { "state_id": 0, "program_state": null, "program_points": [
      {
        "kind": "Statement",
        "stmt_kind": "ImplicitCastExpr",
        "cast_kind": "LValueToRValue",
        "stmt_point_kind": "PreStmt",
        "stmt_id": 5,
        "pointer": "0x6",
        "pretty": "y",
        "location": {
          "file": "main.cpp",
          "line": 8,
          "column": 9
        },
        "tag": "ExprEngine : Clean Node",
        "node_id": 5,
        "has_report": 0,
        "is_sink": 0
      }
    ]}
\l}"];