[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / macro-masking.cpp
blobcd97c07698539f90c2fbe9479a74ae08b94f3b17
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
6 #include "a.h"
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