xref: /aosp_15_r20/external/clang/test/Misc/caret-diags-scratch-buffer.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | not grep keyXXXX
2*67e74705SXin Li // This should not show keyXXXX in the caret diag output.  This once
3*67e74705SXin Li // happened because the two tokens ended up in the scratch buffer and
4*67e74705SXin Li // the caret diag from the scratch buffer included the previous token.
5*67e74705SXin Li #define M(name) \
6*67e74705SXin Li     if (name ## XXXX != name ## _sb);
7*67e74705SXin Li 
foo()8*67e74705SXin Li void foo() {
9*67e74705SXin Li   int keyXXXX;
10*67e74705SXin Li   M(key);
11*67e74705SXin Li }
12*67e74705SXin Li 
13