From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Misc/caret-diags-scratch-buffer.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/Misc/caret-diags-scratch-buffer.c (limited to 'clang/test/Misc/caret-diags-scratch-buffer.c') diff --git a/clang/test/Misc/caret-diags-scratch-buffer.c b/clang/test/Misc/caret-diags-scratch-buffer.c new file mode 100644 index 0000000..883c68e --- /dev/null +++ b/clang/test/Misc/caret-diags-scratch-buffer.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | not grep keyXXXX +// This should not show keyXXXX in the caret diag output. This once +// happened because the two tokens ended up in the scratch buffer and +// the caret diag from the scratch buffer included the previous token. +#define M(name) \ + if (name ## XXXX != name ## _sb); + +void foo() { + int keyXXXX; + M(key); +} + -- cgit v1.2.3