2 // RUN: split-file %s %t
3 // RUN: sed "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
4 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/deps1.json
5 // RUN: mv %t/tu2.c %t/tu.c
6 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/deps2.json
7 // RUN: diff -u %t/deps1.json %t/deps2.json
8 // RUN: FileCheck %s < %t/deps1.json
10 // CHECK: "-fmodule-file={{.*}}Indirect1
11 // CHECK-NOT: "-fmodule-file={{.*}}Indirect
12 // CHECK: "-fmodule-file={{.*}}Indirect2
13 // CHECK-NOT: "-fmodule-file={{.*}}Indirect
15 //--- cdb.json.template
18 "command": "clang -fsyntax-only DIR/tu.c -fmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache",
22 //--- module.modulemap
23 module Indirect1
{ header
"Indirect1.h" }
24 module Indirect2
{ header
"Indirect2.h" }
37 #include "../Indirect1.h"
40 #include "../Indirect2.h"
43 #include "Mod/SubMod1.h"
44 #include "Mod/SubMod2.h"
51 #include "Mod/SubMod2.h"
52 #include "Mod/SubMod1.h"