1 // RUN: rm -rf %t 2 // RUN: split-file %s %t 3 4 // This test checks that source files with uncommon extensions still undergo 5 // dependency directives scan. If header.pch would not and b.h would, the scan 6 // would fail when parsing `void function(B)` and not knowing the symbol B. 7 8 //--- module.modulemap 9 module __PCH { header "header.pch" } 10 module B { header "b.h" } 11 12 //--- header.pch 13 #include "b.h" 14 void function(B); 15 16 //--- b.h 17 typedef int B; 18 19 //--- tu.c main()20int main() { 21 function(0); 22 return 0; 23 } 24 25 //--- cdb.json.in 26 [{ 27 "directory": "DIR", 28 "file": "DIR/tu.c", 29 "command": "clang -c DIR/tu.c -fmodules -fmodules-cache-path=DIR/cache -fimplicit-module-maps -include DIR/header.pch" 30 }] 31 32 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json 33 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/deps.json 34