brintos

brintos / llvm-project-archived public Read only

0
0
Text · 818 B · 3798846 Raw
27 lines · cpp
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 %s5// RUN: %exploded_graph_rewriter %t.dot | FileCheck %s6 7void test1() {8  // Here __FILE__ macros produces a string with `\` delimiters on Windows9  // and the name of the file starts with `l`.10  char text[] = __FILE__;11}12 13void test2() {14  // Here `\l` is in the middle of the literal.15  char text[] = "string\\literal";16}17 18void 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";27