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