2 // RUN: split-file %s %t
4 //--- cdb.json.template
8 "command": "clang -fmodules -fimplicit-module-maps -fmodules-cache-path=DIR/cache -fmodule-name=FWPrivate -c DIR/tu.m -o DIR/tu.o -F DIR/frameworks -Wprivate-module"
11 //--- frameworks/FW.framework/Modules/module.modulemap
12 framework module FW
{}
13 //--- frameworks/FW.framework/Modules/module.private.modulemap
14 // The module name will trigger a diagnostic.
15 framework module FWPrivate
{ header
"private.h" }
16 //--- frameworks/FW.framework/PrivateHeaders/private.h
19 // RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
20 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full > %t/result.json
21 // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t
22 // CHECK: "translation-units": [
24 // CHECK-NEXT: "commands": [
26 // CHECK: "command-line": [
27 // CHECK: "-fmodule-map-file=[[PREFIX]]/frameworks/FW.framework/Modules/module.private.modulemap",
28 // CHECK: "-fmodule-name=FWPrivate",
30 // CHECK-NEXT: "executable": "clang",
31 // CHECK-NEXT: "file-deps": [
32 // CHECK-NEXT: "[[PREFIX]]/tu.m"
34 // CHECK-NEXT: "input-file": "[[PREFIX]]/tu.m"