Debian Codegraph @

clang/test/Modules/transitive-system.test

raw
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3
4 // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
5 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full -module-names=direct > %t/result1.json
6 // RUN: rm -rf %t/cache
7 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full -module-names=transitive > %t/result2.json
8 // RUN: %deps-to-rsp %t/result1.json --module-name transitive > %t/1.rsp
9 // RUN: %deps-to-rsp %t/result2.json --module-name transitive > %t/2.rsp
10 // RUN: diff %t/1.rsp %t/2.rsp
11
12 //--- module.modulemap
13 module direct [system] { header "direct.h" }
14 module transitive { header "transitive.h" }
15
16 //--- direct.h
17 #include "transitive.h"
18
19 //--- transitive.h
20 // empty
21
22 //--- cdb.json.template
23 [{
24 "file": "",
25 "directory": "DIR",
26 "command": "clang -fmodules -fmodules-cache-path=DIR/cache -I DIR -x c"
27 }]