diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/Modules/macro-masking.cpp | |
parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) |
Notes
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 000000000000..3d4e8e0ba49a --- /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 |