summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/macro-reserved.c
blob: a13a37fbddfaf7d618ff3ff7ff8d7c1c9f2e58ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: %clang_cc1 -fsyntax-only %s -verify

#pragma clang diagnostic warning "-Wkeyword-macro"

#define for 0    // expected-warning {{keyword is hidden by macro definition}}
#define final 1
#define __HAVE_X 0
#define _HAVE_X 0
#define X__Y

#undef __cplusplus
#undef _HAVE_X
#undef X__Y

#define switch if  // expected-warning {{keyword is hidden by macro definition}}
#define final 1
#define __HAVE_X 0
#define _HAVE_X 0
#define X__Y

#undef __cplusplus
#undef _HAVE_X
#undef X__Y

int x;
OpenPOWER on IntegriCloud