[flang] Fix crash in HLFIR generation (#118399)
[llvm-project.git] / clang / test / ClangScanDeps / static-analyzer.c
blob8edbf3eaae20aea040f241e7b1813b7e9f891a48
1 // RUN: rm -rf %t.dir
2 // RUN: rm -rf %t-cdb.json
3 // RUN: mkdir -p %t.dir
4 // Change file name to avoid false positives in CHECK, since "static-analyzer.c" is found in %S.
5 // RUN: cp %s %t.dir/static-analyzer_clang.c
6 // RUN: cp %s %t.dir/static-analyzer_clangcl.c
7 // RUN: mkdir %t.dir/Inputs
8 // RUN: cp %S/Inputs/header.h %t.dir/Inputs/analyze_header_input.h
9 // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/static-analyzer-cdb.json > %t-cdb.json
11 // RUN: clang-scan-deps -compilation-database %t-cdb.json -j 1 | FileCheck %s
13 #ifdef __clang_analyzer__
14 #include "Inputs/analyze_header_input.h"
15 #endif
17 // CHECK: static-analyzer_clang.c
18 // CHECK-NEXT: analyze_header_input.h
20 // CHECK: static-analyzer_clangcl.c
21 // CHECK-NEXT: analyze_header_input.h