| 1 |
// RUN: rm -rf %t |
| 2 |
|
| 3 |
// Implicit modules. |
| 4 |
// RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
| 5 |
// RUN: -F %S/Inputs/implicit-private-canonical -fsyntax-only %s -Wprivate-module |
| 6 |
|
| 7 |
// Explicit modules. |
| 8 |
// RUN: %clang_cc1 -x objective-c -fmodules -emit-module -fmodule-name=A -o %t/A.pcm \ |
| 9 |
// RUN: %S/Inputs/implicit-private-canonical/A.framework/Modules/module.modulemap -Wprivate-module |
| 10 |
// RUN: %clang_cc1 -x objective-c -fmodules -emit-module -fmodule-name=A_Private -o %t/A_Private.pcm \ |
| 11 |
// RUN: %S/Inputs/implicit-private-canonical/A.framework/Modules/module.private.modulemap -Wprivate-module |
| 12 |
// RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -fno-implicit-modules \ |
| 13 |
// RUN: -fmodule-file=A=%t/A.pcm -fmodule-file=A_Private=%t/A_Private.pcm \ |
| 14 |
// RUN: -F %S/Inputs/implicit-private-canonical -fsyntax-only %s -Wprivate-module |
| 15 |
|
| 16 |
#ifndef HEADER |
| 17 |
#define HEADER |
| 18 |
|
| 19 |
@import A.Private; // expected-warning {{no submodule named 'Private' in module 'A'; using top level 'A_Private'}} |
| 20 |
// expected-note@Inputs/implicit-private-canonical/A.framework/Modules/module.private.modulemap:1{{module defined here}} |
| 21 |
|
| 22 |
const int *y = &APRIVATE; |
| 23 |
|
| 24 |
#endif |