xref: /llvm-project/clang/test/Analysis/exploded-graph-rewriter/win_path_forbidden_chars.cpp (revision b6a73d06bad46cf11a15a873f4fca732570af458)
1 // FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
2 // RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
3 // RUN:                     -analyzer-checker=core \
4 // RUN:                     -analyzer-dump-egraph=%t.dot %s
5 // RUN: %exploded_graph_rewriter --verbose %t.dot 2>&1 | FileCheck %s
6 // REQUIRES: system-windows
7 
8 // Angle brackets shall not be presented in the field `file`,
9 // because exploded_graph_rewriter handles it as a file path
10 // and such symbols are forbidden on Windows platform.
11 
test()12 void test() {
13   // This produces angle brackets.
14   char text[] = __FILE__;
15 }
16 
17 // This test is passed if exploded_graph_rewriter handles dot file without errors.
18 // CHECK: DEBUG:root:Line: digraph "Exploded Graph"
19 // CHECK: \"file\": \"scratch space\"
20