diff options
Diffstat (limited to 'test/Modules/macro-masking.cpp')
-rw-r--r-- | test/Modules/macro-masking.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Modules/macro-masking.cpp b/test/Modules/macro-masking.cpp new file mode 100644 index 0000000..3d4e8e0 --- /dev/null +++ b/test/Modules/macro-masking.cpp @@ -0,0 +1,16 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fsyntax-only -fmodules %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking +// RxN: %clang_cc1 -fsyntax-only -fmodules -fmodules-local-submodule-visibility %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking -DLOCAL_VISIBILITY +// expected-no-diagnostics + +#include "a.h" + +#ifdef LOCAL_VISIBILITY +# ifndef MACRO +# error should still be defined, undef does not override define +# endif +#else +# ifdef MACRO +# error should have been undefined! +# endif +#endif |