blob: a13a37fbddfaf7d618ff3ff7ff8d7c1c9f2e58ae [file] [log] [blame]
Serge Pavlov59da7b82014-12-12 06:37:55 +00001// RUN: %clang_cc1 -fsyntax-only %s -verify
2
Nico Weber92c14bb2014-12-16 21:16:10 +00003#pragma clang diagnostic warning "-Wkeyword-macro"
4
Serge Pavlov59da7b82014-12-12 06:37:55 +00005#define for 0 // expected-warning {{keyword is hidden by macro definition}}
6#define final 1
7#define __HAVE_X 0
8#define _HAVE_X 0
9#define X__Y
10
11#undef __cplusplus
12#undef _HAVE_X
13#undef X__Y
14
Serge Pavlov59da7b82014-12-12 06:37:55 +000015#define switch if // expected-warning {{keyword is hidden by macro definition}}
16#define final 1
Nico Weber92c14bb2014-12-16 21:16:10 +000017#define __HAVE_X 0
18#define _HAVE_X 0
Serge Pavlov59da7b82014-12-12 06:37:55 +000019#define X__Y
20
Nico Weber92c14bb2014-12-16 21:16:10 +000021#undef __cplusplus
22#undef _HAVE_X
Serge Pavlov59da7b82014-12-12 06:37:55 +000023#undef X__Y
24
25int x;