llvm-project/clang/test/Preprocessor/macro_expand.c

22 lines
312 B
C
Raw Normal View History

2013-01-26 04:34:08 +08:00
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
2006-10-06 10:59:40 +08:00
#define X() Y
#define Y() X
A: X()()()
2013-01-26 04:34:08 +08:00
// CHECK: {{^}}A: Y{{$}}
// PR3927
#define f(x) h(x
#define for(x) h(x
#define h(x) x()
B: f(f))
C: for(for))
2006-10-06 10:59:40 +08:00
2013-01-26 04:34:08 +08:00
// CHECK: {{^}}B: f(){{$}}
// CHECK: {{^}}C: for(){{$}}
// rdar://6880648
#define f(x,y...) y
f()