Clang Project

clang_source_code/test/CodeCompletion/end-of-ident-macro.cpp
1#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