| 1 |
// CAUTION: The name of this file should start with `l` for proper tests. |
| 2 |
// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \ |
| 3 |
// RUN: -analyzer-checker=core \ |
| 4 |
// RUN: -analyzer-dump-egraph=%t.dot %s |
| 5 |
// RUN: %exploded_graph_rewriter %t.dot | FileCheck %s |
| 6 |
|
| 7 |
void test1() { |
| 8 |
// Here __FILE__ macros produces a string with `\` delimiters on Windows |
| 9 |
// and the name of the file starts with `l`. |
| 10 |
char text[] = __FILE__; |
| 11 |
} |
| 12 |
|
| 13 |
void test2() { |
| 14 |
// Here `\l` is in the middle of the literal. |
| 15 |
char text[] = "string\\literal"; |
| 16 |
} |
| 17 |
|
| 18 |
void test() { |
| 19 |
test1(); |
| 20 |
test2(); |
| 21 |
} |
| 22 |
|
| 23 |
// This test is passed if exploded_graph_rewriter handles dot file without errors. |
| 24 |
// CHECK: digraph "ExplodedGraph" |
| 25 |
// CHECK: shape=record,label=<<table border="0"> |
| 26 |
// CHECK: char text[] = "string\\literal"; |