Richard Smith | 38477db | 2015-05-02 00:45:56 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 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 |
Richard Smith | 38477db | 2015-05-02 00:45:56 +0000 | [diff] [blame] | 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 |