summaryrefslogtreecommitdiff
path: root/clang/test/Preprocessor/macro_misc.c
blob: 53d99821ccd49eed6f63461f2371169a630d6dc4 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %clang_cc1 %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}}