3 // RUN: %clang_cc1 %s \
4 // RUN: -fmodules-local-submodule-visibility \
5 // RUN: -fmodule-map-file=%S/Inputs/lsv-private-macro/mod.map \
6 // RUN: -I%S/Inputs/lsv-private-macro -fmodule-name=self \
7 // RUN: -verify=expected-lsv
9 // RUN: %clang_cc1 %s \
10 // RUN: -fmodules -fmodules-cache-path=%t \
11 // RUN: -fmodule-map-file=%S/Inputs/lsv-private-macro/mod.map \
12 // RUN: -I%S/Inputs/lsv-private-macro -fmodule-name=self \
13 // RUN: -verify=expected-nolsv
15 // RUN: %clang_cc1 %s \
16 // RUN: -fmodules -fmodules-cache-path=%t \
17 // RUN: -fmodules-local-submodule-visibility \
18 // RUN: -fmodule-map-file=%S/Inputs/lsv-private-macro/mod.map \
19 // RUN: -I%S/Inputs/lsv-private-macro -fmodule-name=self \
20 // RUN: -verify=expected-lsv
24 // With local submodule visibility enabled, private macros don't leak out of
25 // their respective submodules, even within the same top-level module.
26 // expected-lsv-no-diagnostics
28 // expected-nolsv-error@+2 {{SELF_PRIVATE defined}}
30 #error SELF_PRIVATE defined
34 #error SELF_PUBLIC not defined
38 #error SELF_DEFAULT not defined
44 #error OTHER_PRIVATE defined
48 #error OTHER_PUBLIC not defined
52 #error OTHER_DEFAULT not defined