Fix some typos (#123506)
[llvm-project.git] / clang / test / ClangScanDeps / modules-minimize-extension.c
blob0f27f608440f4593effb010ebceef768e749544a
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
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.
8 //--- module.modulemap
9 module __PCH { header "header.pch" }
10 module B { header "b.h" }
12 //--- header.pch
13 #include "b.h"
14 void function(B);
16 //--- b.h
17 typedef int B;
19 //--- tu.c
20 int main() {
21 function(0);
22 return 0;
25 //--- cdb.json.in
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"
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