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