Debian Codegraph @

clang/test/Analysis/scan-build/deduplication.test

raw
1 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
2 RUN: %scan-build -o %t.output_dir \
3 RUN: %clang -S %S/Inputs/deduplication/1.c \
4 RUN: %S/Inputs/deduplication/2.c \
5 RUN: | FileCheck %s -check-prefix CHECK-STDOUT
6
7 RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
8
9 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
10 RUN: %scan-build -o %t.output_dir \
11 RUN: -analyzer-config stable-report-filename=true \
12 RUN: %clang -S %S/Inputs/deduplication/1.c \
13 RUN: %S/Inputs/deduplication/2.c \
14 RUN: | FileCheck %s -check-prefix CHECK-STDOUT
15
16 RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
17
18 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
19 RUN: %scan-build -o %t.output_dir \
20 RUN: -analyzer-config verbose-report-filename=true \
21 RUN: %clang -S %S/Inputs/deduplication/1.c \
22 RUN: %S/Inputs/deduplication/2.c \
23 RUN: | FileCheck %s -check-prefix CHECK-STDOUT
24
25 RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
26
27 // Only one report file should be generated.
28
29 CHECK-STDOUT: scan-build: Using '{{.*}}' for static analysis
30 CHECK-STDOUT: scan-build: 1 bug found.
31 CHECK-STDOUT: scan-build: Run 'scan-view {{.*}}' to examine bug reports.
32
33
34 CHECK-FILENAMES: index.html
35 CHECK-FILENAMES-NEXT: report-{{.*}}.html
36 CHECK-FILENAMES-NEXT: scanview.css
37 CHECK-FILENAMES-NEXT: sorttable.js