1 // Check dependency scanning when skipping an unmatched #if 2 3 // RUN: rm -rf %t 4 // RUN: split-file %s %t 5 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json 6 7 // RUN: not clang-scan-deps -compilation-database %t/cdb.json 2>&1 | FileCheck %s 8 // CHECK: header1.h:1:2: error: unterminated conditional directive 9 10 //--- cdb.json.template 11 [{ 12 "directory" : "DIR", 13 "command" : "clang -target x86_64-apple-macosx10.7 -c DIR/test.cpp -o DIR/test.o", 14 "file" : "DIR/test.o" 15 }] 16 17 //--- test.cpp 18 #include "header1.h" 19 #include "header2.h" 20 21 //--- header1.h 22 #if 0 23 24 //--- header2.h 25 #ifndef _HEADER2_H_ 26 #define _HEADER2_H_ 27 #endif 28