Commit a2f6f52
committed
test: add regression test for ## PAR-style indirection (hashhash_funclike_par_indirection)
Covers the fix in expandHashHash(): when ## concatenation produces a
function-like macro name but '(' is not immediately adjacent in the
replacement text (hidden behind a comma/parameter), the forward scan
must locate '(' and complete the expansion.
#define PAR(a, ...) a __VA_ARGS__
#define PREFIX_SCALAR(T, N) T N
#define DISPATCH(kind, ...) PAR(PREFIX_ ## kind, (__VA_ARGS__))
DISPATCH(SCALAR, int, x) // expected: int x1 parent a328c4d commit a2f6f52
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2038 | 2038 | | |
2039 | 2039 | | |
2040 | 2040 | | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
2041 | 2061 | | |
2042 | 2062 | | |
2043 | 2063 | | |
| |||
4669 | 4689 | | |
4670 | 4690 | | |
4671 | 4691 | | |
| 4692 | + | |
4672 | 4693 | | |
4673 | 4694 | | |
4674 | 4695 | | |
| |||
0 commit comments