diff options
author | Chris Lattner <sabre@nondot.org> | 2011-06-14 18:19:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-06-14 18:19:37 +0000 |
commit | b11e43c31dc5d395a7ec6a07259c078dadd4f47b (patch) | |
tree | fafbc37eefe408fe2fa264b8d1e949d369c7d45f /test/Preprocessor/macro_paste_simple.c | |
parent | 0e0b6931598be8a50ac5c6e0be595b35da276df9 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/macro_paste_simple.c')
-rw-r--r-- | test/Preprocessor/macro_paste_simple.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/Preprocessor/macro_paste_simple.c b/test/Preprocessor/macro_paste_simple.c index 563d7f4495..0e62ba46dc 100644 --- a/test/Preprocessor/macro_paste_simple.c +++ b/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: ## + |