summaryrefslogtreecommitdiffstats
path: root/tests/preprocessor/preproc-concat-4.slang
blob: 4d1e3425f5f4caecb0d08461034c79b4a3a946a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//DIAGNOSTIC_TEST:SIMPLE:-E

#define CONCAT(a, b) a ## b

#define A a
#define B b

#define A2 A
#define B2 B

#define STRINGIFY(x) #x

// Should be 
// CONCAT(a, b) A2B2 CONCAT(a, b)
// CONCAT is disabled, A and B are expanded on next pass
// A2 B2 are first and last tokens pre expansion args
// 
// Old Slang outputs 
// ab ab ab 

CONCAT(CONCAT(A, B) A2, B2 CONCAT(A, B))