Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Preprocessor / pragma_poison.c
blob5b39183b60d36b8132196ded11209b78f0fa7fe1
1 // RUN: %clang_cc1 %s -Eonly -verify
3 #pragma GCC poison rindex
4 rindex(some_string, 'h'); // expected-error {{attempt to use a poisoned identifier}}
6 #define BAR _Pragma ("GCC poison XYZW") XYZW /*NO ERROR*/
7 XYZW // ok
8 BAR
9 XYZW // expected-error {{attempt to use a poisoned identifier}}
11 // Pragma poison shouldn't warn from macro expansions defined before the token
12 // is poisoned.
14 #define strrchr rindex2
15 #pragma GCC poison rindex2
17 // Can poison multiple times.
18 #pragma GCC poison rindex2
20 strrchr(some_string, 'h'); // ok.