llvm-capstone/clang/test/Preprocessor/macro_paste_simple.c
Chris Lattner 848fa212e8 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
2011-06-14 18:19:37 +00:00

15 lines
177 B
C

// RUN: %clang_cc1 %s -E | FileCheck %s
#define FOO bar ## baz ## 123
// CHECK: A: barbaz123
A: FOO
// PR9981
#define M1(A) A
#define M2(X) X
B: M1(M2(##))
// CHECK: B: ##