| // Checks that macros from transitive imports work with local submodule |
| // visibility. In the below test, previously a() and d() failed because |
| // OTHER_MACRO1 and OTHER_MACRO3 were not visible at the use site. |
| // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
| // RUN: -fmodules-local-submodule-visibility -I%t %t/tu.c -verify |
| #define OTHER_MACRO1(...) |
| #define OTHER_MACRO2(...) |
| #define OTHER_MACRO3(...) |
| module O1 { header "Other1.h" } |
| module O2 { header "Other2.h" } |
| module O3 { header "Other3.h" } |
| #define MACRO_A OTHER_MACRO1(x, y) |
| #define MACRO_B OTHER_MACRO2(x, y) |
| #define MACRO_D OTHER_MACRO3(x, y) |
| //--- Top/module.modulemap |
| module A { header "A.h" export * } |
| module D { header "D.h" export * } |
| // expected-no-diagnostics |