2 // RUN: split-file %s %t
7 "command": "clang -c DIR/tu.c -o DIR/tu.o -IDIR/include",
10 //--- include/header1.h
11 //--- include/header2.h
12 //--- include/header3.h
13 //--- include/header4.h
15 #if __has_include("header1.h")
19 #elif __has_include("header2.h")
22 #define H3 __has_include("header3.h")
26 #define H4 __has_include("header4.h")
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
36 // CHECK-NEXT: header1.h
37 // CHECK-NEXT: header2.h
38 // CHECK-NEXT: header3.h
39 // CHECK-NEXT: header4.h