brintos

brintos / llvm-project-archived public Read only

0
0
Text · 529 B · 0a2dadd Raw
14 lines · c
1// Assorted macros to help test #include behavior across file boundaries.2 3#define helper1 04 5void helper2(const char *, ...);6 7#define M1(a, ...) helper2(a, ##__VA_ARGS__);8 9// Note: M2 stresses vararg macro functions with macro arguments. The spelling10// locations of the args used to be set to the expansion site, leading to11// crashes (region LineEnd < LineStart). The regression test requires M2's line12// number to be greater than the line number containing the expansion.13#define M2(a, ...) M1(a, helper1, ##__VA_ARGS__);14