2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -E %s -o - | FileCheck -strict-whitespace %s
|
2009-10-27 10:36:32 +08:00
|
|
|
|
|
|
|
|
2006-07-28 14:54:07 +08:00
|
|
|
#define y(a) ..a
|
2009-04-22 07:28:41 +08:00
|
|
|
A: y(.)
|
2009-10-27 10:36:32 +08:00
|
|
|
// This should print as ".. ." to avoid turning into ...
|
2010-04-14 11:57:19 +08:00
|
|
|
// CHECK: A: .. .
|
2009-10-27 10:36:32 +08:00
|
|
|
|
2010-04-14 11:57:19 +08:00
|
|
|
#define X 0 .. 1
|
|
|
|
B: X
|
|
|
|
// CHECK: B: 0 .. 1
|
2009-04-22 07:28:41 +08:00
|
|
|
|
|
|
|
#define DOT .
|
|
|
|
C: ..DOT
|
2009-10-27 10:36:32 +08:00
|
|
|
// CHECK: C: .. .
|
2009-04-22 07:28:41 +08:00
|
|
|
|
2006-07-28 14:54:07 +08:00
|
|
|
|
|
|
|
#define PLUS +
|
|
|
|
#define EMPTY
|
|
|
|
#define f(x) =x=
|
2009-04-22 07:28:41 +08:00
|
|
|
D: +PLUS -EMPTY- PLUS+ f(=)
|
2009-10-27 10:36:32 +08:00
|
|
|
// CHECK: D: + + - - + + = = =
|
2006-07-28 14:54:07 +08:00
|
|
|
|
2008-01-15 13:22:14 +08:00
|
|
|
|
|
|
|
#define test(x) L#x
|
2009-04-22 07:28:41 +08:00
|
|
|
E: test(str)
|
2009-10-27 10:36:32 +08:00
|
|
|
// Should expand to L "str" not L"str"
|
|
|
|
// CHECK: E: L "str"
|
2008-01-15 13:22:14 +08:00
|
|
|
|
2010-03-27 01:10:02 +08:00
|
|
|
// Should avoid producing >>=.
|
|
|
|
#define equal =
|
|
|
|
F: >>equal
|
|
|
|
// CHECK: F: >> =
|