blob: ec10374a1d6ad32212a1dbb746f9ba5cc8a3c815 [file] [log] [blame]
Nico Weber93dec512012-09-26 08:19:01 +00001// RUN: %clang_cc1 -E -fms-compatibility %s -o %t
2// RUN: FileCheck %s < %t
Joao Matos181cd5b2012-08-31 21:10:54 +00003
4# define M2(x, y) x + y
5# define P(x, y) {x, y}
6# define M(x, y) M2(x, P(x, y))
7M(a, b) // CHECK: a + {a, b}
Nico Weber93dec512012-09-26 08:19:01 +00008
9// Regression test for PR13924
10#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
11#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
12
13#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
14
15#define GMOCK_ACTION_CLASS_(name, value_params)\
16 GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
17
18#define ACTION_TEMPLATE(name, template_params, value_params)\
19class GMOCK_ACTION_CLASS_(name, value_params) {\
20}
21
22ACTION_TEMPLATE(InvokeArgument,
23 HAS_1_TEMPLATE_PARAMS(int, k),
24 AND_2_VALUE_PARAMS(p0, p1));