1 // Ensure that the spelling of a path seen outside a module (e.g. header via
2 // symlink) does not leak into the compilation of that module unnecessarily.
3 // Note: the spelling of the modulemap path still depends on the includer, since
4 // that is the only source of information about it.
9 // RUN: split-file %s %t
10 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json
11 // RUN: ln -s A.h %t/Z.h
13 // RUN: clang-scan-deps -compilation-database %t/cdb.json -j 1 -format experimental-full \
14 // RUN: -mode preprocess-dependency-directives > %t/output
15 // RUN: FileCheck %s < %t/output
17 // CHECK: "modules": [
19 // CHECK: "file-deps": [
20 // CHECK-NEXT: "{{.*}}A.h",
21 // CHECK-NEXT: "{{.*}}module.modulemap"
23 // CHECK-NEXT: "name": "A"
29 "command": "clang -fsyntax-only DIR/tu.c -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps",
33 //--- module.modulemap
34 module A
{ header
"A.h" }
35 module B
{ header
"B.h" }
36 module C
{ header
"C.h" }