From ec2b103c267a06a66e926f62cd96767b280f5cf5 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 2 Jun 2009 17:58:47 +0000 Subject: Import Clang, at r72732. --- test/Preprocessor/macro_misc.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/Preprocessor/macro_misc.c (limited to 'test/Preprocessor/macro_misc.c') diff --git a/test/Preprocessor/macro_misc.c b/test/Preprocessor/macro_misc.c new file mode 100644 index 000000000000..169c5ec772a2 --- /dev/null +++ b/test/Preprocessor/macro_misc.c @@ -0,0 +1,23 @@ +// RUN: clang-cc %s -Eonly -verify + +// This should not be rejected. +#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}} + -- cgit v1.2.3