blob: f288979a2c4d866eb1dcc0c352c7cb519b3003ee [file] [log] [blame]
Ilya Biryukovb3510c42018-04-24 13:48:53 +00001#define FUNC(X) X
2#define FUNCTOR
3using FUNCTION = int();
4// We should get all three completions when the cursor is at the beginning,
5// middle, or end.
6FUNC(int) a = 10;
7// ^FUNC(int)
8// RUN: %clang_cc1 -code-completion-at=%s:6:1 -code-completion-macros %s | FileCheck %s
9// FU^NC(int)
10// RUN: %clang_cc1 -code-completion-at=%s:6:3 -code-completion-macros %s | FileCheck %s
11// FUNC^(int)
12// RUN: %clang_cc1 -code-completion-at=%s:6:5 -code-completion-macros %s | FileCheck %s
13
14// CHECK: COMPLETION: FUNC : FUNC(<#X#>)
15// CHECK: COMPLETION: FUNCTION : FUNCTION
16// CHECK: COMPLETION: FUNCTOR : FUNCTOR