summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/output_paste_avoid.c
blob: ff8afc3e47ac9816db76a35bfa591a083407659b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: clang-cc -E %s -o %t &&
// This should print as ".. ." to avoid turning into ...
// RUN: grep -F 'A: . . .' %t &&
#define y(a) ..a
A: y(.)

// RUN: grep -F 'C: .. .' %t &&
#define DOT .
C: ..DOT


// RUN: grep -F 'D: + + - - + + = = =' %t &&
#define PLUS +
#define EMPTY
#define f(x) =x=
D: +PLUS -EMPTY- PLUS+ f(=)

// RUN: grep -F 'E: L "str"' %t

// Should expand to L "str" not L"str"
#define test(x) L#x
E: test(str)

OpenPOWER on IntegriCloud