2009-04-13 05:29:17 +04:00
|
|
|
// __COUNTER__ support: rdar://4329310
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: clang -E %s > %t
|
2009-04-13 05:29:17 +04:00
|
|
|
|
|
|
|
#define PASTE2(x,y) x##y
|
|
|
|
#define PASTE1(x,y) PASTE2(x,y)
|
|
|
|
#define UNIQUE(x) PASTE1(x,__COUNTER__)
|
|
|
|
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep "A: 0" %t
|
2009-04-13 05:29:17 +04:00
|
|
|
A: __COUNTER__
|
|
|
|
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep "B: foo1" %t
|
2009-04-13 05:29:17 +04:00
|
|
|
B: UNIQUE(foo);
|
2009-11-08 04:45:36 +03:00
|
|
|
// RUN: grep "C: foo2" %t
|
2009-04-13 05:29:17 +04:00
|
|
|
C: UNIQUE(foo);
|
|
|
|
// RUN: grep "D: 3" %t
|
|
|
|
D: __COUNTER__
|