forked from abhi5658054/clang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] exploded-graph-rewriter: Implement checker messages.
They are displayed as raw lines and diffed via difflib on a per-checker basis. Differential Revision: https://reviews.llvm.org/D64100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364989 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
9 changed files
with
239 additions
and
10 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
test/Analysis/exploded-graph-rewriter/checker_messages.dot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// RUN: %exploded_graph_rewriter %s | FileCheck %s | ||
|
||
// FIXME: Substitution doesn't seem to work on Windows. | ||
// UNSUPPORTED: system-windows | ||
|
||
// CHECK: <b>Checker State: </b> | ||
// CHECK-SAME: <td align="left"><i>alpha.core.FooChecker</i>:</td> | ||
// CHECK-SAME: <td align="left">Foo stuff:</td> | ||
// CHECK-SAME: <td align="left">Foo: Bar</td> | ||
Node0x1 [shape=record,label= | ||
"{ | ||
{ "node_id": 1, | ||
"pointer": "0x1", | ||
"state_id": 2, | ||
"program_points": [], | ||
"program_state": { | ||
"store": null, | ||
"constraints": null, | ||
"dynamic_types": null, | ||
"constructing_objects": null, | ||
"environment": null, | ||
"checker_messages": [ | ||
{ "checker": "alpha.core.FooChecker", "messages": [ | ||
"Foo stuff:", | ||
"Foo: Bar" | ||
]} | ||
] | ||
} | ||
} | ||
\l}"]; |
93 changes: 93 additions & 0 deletions
93
test/Analysis/exploded-graph-rewriter/checker_messages_diff.dot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// RUN: %exploded_graph_rewriter -d %s | FileCheck %s | ||
|
||
// FIXME: Substitution doesn't seem to work on Windows. | ||
// UNSUPPORTED: system-windows | ||
|
||
Node0x1 [shape=record,label= | ||
"{ | ||
{ "node_id": 1, | ||
"pointer": "0x1", | ||
"state_id": 2, | ||
"program_points": [], | ||
"program_state": { | ||
"environment": null, | ||
"store": null, | ||
"constraints": null, | ||
"dynamic_types": null, | ||
"constructing_objects": null, | ||
"checker_messages": [ | ||
{ "checker": "FooChecker", "messages": [ | ||
"Foo: Bar" | ||
]}, | ||
{ "checker": "BarChecker", "messages": [ | ||
"Bar: Foo" | ||
]} | ||
] | ||
} | ||
} | ||
\l}"]; | ||
|
||
Node0x1 -> Node0x4; | ||
|
||
|
||
// CHECK: Node0x4 [ | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="red">-</font></td> | ||
// CHECK-SAME: <td align="left"><i>BarChecker</i>:</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="red">-</font></td> | ||
// CHECK-SAME: <td align="left">Bar: Foo</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td></td> | ||
// CHECK-SAME: <td align="left"><i>FooChecker</i>:</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="forestgreen">+</font></td> | ||
// CHECK-SAME: <td align="left"> Bar: Foo</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="forestgreen">+</font></td> | ||
// CHECK-SAME: <td align="left"><i>DunnoWhateverSomeOtherChecker</i>:</td> | ||
// CHECK-SAME: </tr> | ||
// CHECK-SAME: <tr> | ||
// CHECK-SAME: <td><font color="forestgreen">+</font></td> | ||
// CHECK-SAME: <td align="left">Dunno, some other message.</td> | ||
// CHECK-SAME: </tr> | ||
Node0x4 [shape=record,label= | ||
"{ | ||
{ "node_id": 4, | ||
"pointer": "0x4", | ||
"state_id": 5, | ||
"program_points": [], | ||
"program_state": { | ||
"environment": null, | ||
"store": null, | ||
"constraints": null, | ||
"dynamic_types": null, | ||
"constructing_objects": null, | ||
"checker_messages": [ | ||
{ "checker": "FooChecker", "messages": [ | ||
"Foo: Bar", | ||
"Bar: Foo" | ||
]}, | ||
{ "checker": "DunnoWhateverSomeOtherChecker", "messages": [ | ||
"Dunno, some other message." | ||
]} | ||
] | ||
} | ||
} | ||
\l}"]; | ||
|
||
Node0x4 -> Node0x6; | ||
|
||
Node0x6 [shape=record,label= | ||
"{ | ||
{ "node_id": 6, | ||
"pointer": "0x6", | ||
"state_id": 7, | ||
"program_points": [], | ||
"program_state": null | ||
} | ||
\l}"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters