blob: 2a0e26f8e3afee4a58602cafb7e170e58827b454 [file] [log] [blame]
Serge Pavlov59da7b82014-12-12 06:37:55 +00001// RUN: %clang_cc1 -fsyntax-only %s -verify
2
3#define for 0 // expected-warning {{keyword is hidden by macro definition}}
4#define final 1
5#define __HAVE_X 0
6#define _HAVE_X 0
7#define X__Y
8
9#undef __cplusplus
10#undef _HAVE_X
11#undef X__Y
12
13#pragma clang diagnostic warning "-Wreserved-id-macro"
14
15#define switch if // expected-warning {{keyword is hidden by macro definition}}
16#define final 1
17#define __HAVE_X 0 // expected-warning {{macro name is a reserved identifier}}
18#define _HAVE_X 0 // expected-warning {{macro name is a reserved identifier}}
19#define X__Y
20
21#undef __cplusplus // expected-warning {{macro name is a reserved identifier}}
22#undef _HAVE_X // expected-warning {{macro name is a reserved identifier}}
23#undef X__Y
24
25int x;