2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -Eonly -verify
|
2006-07-03 09:26:39 +08:00
|
|
|
|
|
|
|
// This should not be rejected.
|
|
|
|
#ifdef defined
|
|
|
|
#endif
|
|
|
|
|
2009-03-10 04:33:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
// 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}}
|
|
|
|
|