| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking |
| 3 |
// RxN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking -DLOCAL_VISIBILITY |
| 4 |
// expected-no-diagnostics |
| 5 |
|
| 6 |
#include "a.h" |
| 7 |
|
| 8 |
#ifdef LOCAL_VISIBILITY |
| 9 |
# ifndef MACRO |
| 10 |
# error should still be defined, undef does not override define |
| 11 |
# endif |
| 12 |
#else |
| 13 |
# ifdef MACRO |
| 14 |
# error should have been undefined! |
| 15 |
# endif |
| 16 |
#endif |