cling/test/CodeUnloading/Macros.h
Javier Lopez-Gomez e635331e85 Fix CodeUnloading/Macros.C test
Clang diagnostic verification was unhappy with the previous state of
affairs. Move affected `expected-(warning|note)` markers to `Macros.h`.

Apparently, as Jonas Hahnfeld found, this failure originated in commit
8deb57c04a5ceea96533d095092fcd4f71d1df94, but is not to be reverted
per discussion in https://github.com/root-project/root/pull/12454.
2023-05-19 23:29:06 +02:00

31 lines
907 B
C

#ifndef TESTB
#define TEST "TEST 0"
#define TEST "TEST 1"
#define TEST "TEST 2"
#define TEST "TEST 3"
#define TEST "TEST 4"
// expected-warning@3 {{'TEST' macro redefined}}
// expected-note@2 {{previous definition is here}}
// expected-warning@4 {{'TEST' macro redefined}}
// expected-note@3 {{previous definition is here}}
// expected-warning@5 {{'TEST' macro redefined}}
// expected-note@4 {{previous definition is here}}
// expected-warning@6 {{'TEST' macro redefined}}
// expected-note@5 {{previous definition is here}}
#else
#define TEST "TEST A"
#undef TEST
#define TEST "TEST B"
#undef TEST
#define TEST "TEST C"
#undef TEST
#define TEST "TEST D"
#undef TEST
#define TEST "TEST E"
#undef TEST
#define TEST "TEST F"
#define TEST "TEST G"
// expected-warning@27 {{'TEST' macro redefined}}
// expected-note@26 {{previous definition is here}}
#endif