Home | History | Annotate | Download | only in Lexer
      1 // __COUNTER__ support: rdar://4329310
      2 // RUN: %clang -E %s > %t
      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 // RUN: grep "A: 0" %t
      9 A: __COUNTER__
     10 
     11 // RUN: grep "B: foo1" %t
     12 B: UNIQUE(foo);
     13 // RUN: grep "C: foo2" %t
     14 C: UNIQUE(foo);
     15 // RUN: grep "D: 3" %t
     16 D: __COUNTER__
     17