[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / ClangScanDeps / has_include_if_elif.cpp
blobb8b5bb8b6bf09f850335533112504c97fdddc66a
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
4 //--- cdb.json.in
5 [{
6 "directory": "DIR",
7 "command": "clang -c DIR/tu.c -o DIR/tu.o -IDIR/include",
8 "file": "DIR/tu.c"
9 }]
10 //--- include/header1.h
11 //--- include/header2.h
12 //--- include/header3.h
13 //--- include/header4.h
14 //--- tu.c
15 #if __has_include("header1.h")
16 #endif
18 #if 0
19 #elif __has_include("header2.h")
20 #endif
22 #define H3 __has_include("header3.h")
23 #if H3
24 #endif
26 #define H4 __has_include("header4.h")
27 #if 0
28 #elif H4
29 #endif
31 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json
32 // RUN: clang-scan-deps -compilation-database %t/cdb.json -mode preprocess-dependency-directives | FileCheck %s
33 // RUN: clang-scan-deps -compilation-database %t/cdb.json -mode preprocess | FileCheck %s
35 // CHECK: tu.c
36 // CHECK-NEXT: header1.h
37 // CHECK-NEXT: header2.h
38 // CHECK-NEXT: header3.h
39 // CHECK-NEXT: header4.h