summaryrefslogtreecommitdiff
path: root/test/Modules/macro-masking.cpp
blob: cd97c07698539f90c2fbe9479a74ae08b94f3b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: rm -rf %t
// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking
// 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
// 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