aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/macro_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/macro_misc.c')
-rw-r--r--test/Preprocessor/macro_misc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Preprocessor/macro_misc.c b/test/Preprocessor/macro_misc.c
index 66e9e3fcf3..147e827df3 100644
--- a/test/Preprocessor/macro_misc.c
+++ b/test/Preprocessor/macro_misc.c
@@ -4,3 +4,20 @@
#ifdef defined
#endif
+
+
+// PR3764
+
+// This should not produce a redefinition warning.
+#define FUNC_LIKE(a) (a)
+#define FUNC_LIKE(a)(a)
+
+// This either.
+#define FUNC_LIKE2(a)\
+(a)
+#define FUNC_LIKE2(a) (a)
+
+// This should.
+#define FUNC_LIKE3(a) ( a) // expected-note {{previous definition is here}}
+#define FUNC_LIKE3(a) (a) // expected-warning {{'FUNC_LIKE3' macro redefined}}
+