[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / ClangScanDeps / modules-implementation-module-map.c
blobd76d31570046996177daeeb8afac76aad1335371
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
4 //--- cdb.json.template
5 [{
6 "file": "DIR/tu.m",
7 "directory": "DIR",
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"
9 }]
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
17 //--- tu.m
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": [
23 // CHECK-NEXT: {
24 // CHECK-NEXT: "commands": [
25 // CHECK: {
26 // CHECK: "command-line": [
27 // CHECK: "-fmodule-map-file=[[PREFIX]]/frameworks/FW.framework/Modules/module.private.modulemap",
28 // CHECK: "-fmodule-name=FWPrivate",
29 // CHECK: ],
30 // CHECK-NEXT: "executable": "clang",
31 // CHECK-NEXT: "file-deps": [
32 // CHECK-NEXT: "[[PREFIX]]/tu.m"
33 // CHECK-NEXT: ],
34 // CHECK-NEXT: "input-file": "[[PREFIX]]/tu.m"
35 // CHECK-NEXT: }
36 // CHECK: ]
37 // CHECK: }
38 // CHECK: ]