From 848fa212e8a5e966f140b2ccc24f6a0815846fa2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 14 Jun 2011 18:19:37 +0000 Subject: revert r133003 and fix the bug properly: the issue was that ## in a token lexer is not a paste operator, it is a normal token. This fixes a conformance issue shown here: http://p99.gforge.inria.fr/c99-conformance/c99-conformance-clang-2.9.html and it defines away the crash from before. llvm-svn: 133005 --- clang/test/Preprocessor/macro_paste_simple.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'clang/test/Preprocessor/macro_paste_simple.c') diff --git a/clang/test/Preprocessor/macro_paste_simple.c b/clang/test/Preprocessor/macro_paste_simple.c index 563d7f44958..0e62ba46dc9 100644 --- a/clang/test/Preprocessor/macro_paste_simple.c +++ b/clang/test/Preprocessor/macro_paste_simple.c @@ -1,5 +1,14 @@ -// RUN: %clang_cc1 %s -E | grep "barbaz123" +// RUN: %clang_cc1 %s -E | FileCheck %s #define FOO bar ## baz ## 123 -FOO +// CHECK: A: barbaz123 +A: FOO + +// PR9981 +#define M1(A) A +#define M2(X) X +B: M1(M2(##)) + +// CHECK: B: ## + -- cgit v1.2.3