xref: /aosp_15_r20/external/clang/test/CoverageMapping/Inputs/macros.h (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // Assorted macros to help test #include behavior across file boundaries.
2*67e74705SXin Li 
3*67e74705SXin Li #define helper1 0
4*67e74705SXin Li 
5*67e74705SXin Li void helper2(const char *, ...);
6*67e74705SXin Li 
7*67e74705SXin Li #define M1(a, ...) helper2(a, ##__VA_ARGS__);
8*67e74705SXin Li 
9*67e74705SXin Li // Note: M2 stresses vararg macro functions with macro arguments. The spelling
10*67e74705SXin Li // locations of the args used to be set to the expansion site, leading to
11*67e74705SXin Li // crashes (region LineEnd < LineStart). The regression test requires M2's line
12*67e74705SXin Li // number to be greater than the line number containing the expansion.
13*67e74705SXin Li #define M2(a, ...) M1(a, helper1, ##__VA_ARGS__);
14