2 // RUN: split-file %s %t
3 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
5 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full -mode preprocess-dependency-directives > %t/result.txt
7 // RUN: FileCheck %s -input-file %t/result.txt
9 // Verify that there's a single version of module A.
11 // CHECK: "modules": [
13 // CHECK: "command-line": [
14 // CHECK-NOT: "-fvisibility="
15 // CHECK-NOT: "-ftype-visibility="
19 // CHECK-NOT: "name": "A"
20 // CHECK: "translation-units"
22 //--- cdb.json.template
26 "command": "clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -fsyntax-only DIR/t1.c",
31 "command": "clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -fvisibility=hidden -fsyntax-only DIR/t2.c",
36 "command": "clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -fvisibility=hidden -fvisibility-ms-compat -fsyntax-only DIR/t3.c",
41 //--- modules/A/module.modulemap