summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/macro-reserved.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Preprocessor/macro-reserved.c')
-rw-r--r--clang/test/Preprocessor/macro-reserved.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Preprocessor/macro-reserved.c b/clang/test/Preprocessor/macro-reserved.c
index 2a0e26f8e3a..a13a37fbddf 100644
--- a/clang/test/Preprocessor/macro-reserved.c
+++ b/clang/test/Preprocessor/macro-reserved.c
@@ -1,5 +1,7 @@
// 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
@@ -10,16 +12,14 @@
#undef _HAVE_X
#undef X__Y
-#pragma clang diagnostic warning "-Wreserved-id-macro"
-
#define switch if // expected-warning {{keyword is hidden by macro definition}}
#define final 1
-#define __HAVE_X 0 // expected-warning {{macro name is a reserved identifier}}
-#define _HAVE_X 0 // expected-warning {{macro name is a reserved identifier}}
+#define __HAVE_X 0
+#define _HAVE_X 0
#define X__Y
-#undef __cplusplus // expected-warning {{macro name is a reserved identifier}}
-#undef _HAVE_X // expected-warning {{macro name is a reserved identifier}}
+#undef __cplusplus
+#undef _HAVE_X
#undef X__Y
int x;
OpenPOWER on IntegriCloud