Mercurial > hg > CbC > CbC_llvm
annotate clang/test/Preprocessor/macro_paste_hard.c @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -E %s | grep '1: aaab 2' |
2 // RUN: %clang_cc1 -E %s | grep '2: 2 baaa' | |
3 // RUN: %clang_cc1 -E %s | grep '3: 2 xx' | |
4 | |
5 #define a(n) aaa ## n | |
6 #define b 2 | |
7 1: a(b b) // aaab 2 2 gets expanded, not b. | |
8 | |
9 #undef a | |
10 #undef b | |
11 #define a(n) n ## aaa | |
12 #define b 2 | |
13 2: a(b b) // 2 baaa 2 gets expanded, not b. | |
14 | |
15 #define baaa xx | |
16 3: a(b b) // 2 xx | |
17 |