• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // __COUNTER__ support: rdar://4329310
2 // RUN: %clang -E %s | FileCheck %s
3 
4 #define PASTE2(x,y) x##y
5 #define PASTE1(x,y) PASTE2(x,y)
6 #define UNIQUE(x) PASTE1(x,__COUNTER__)
7 
8 A: __COUNTER__
9 B: UNIQUE(foo);
10 C: UNIQUE(foo);
11 D: __COUNTER__
12 
13 // CHECK: A: 0
14 // CHECK: B: foo1;
15 // CHECK: C: foo2;
16 // CHECK: D: 3
17 
18