xref: /llvm-project/clang/test/CodeCompletion/inside-macros.cpp (revision cf9b25e0adc42546e4dc5ff51ee8674d45bac26b)
1b8f231a4SIlya Biryukov #define ID(X) X
2b8f231a4SIlya Biryukov 
test(bool input_var)3b8f231a4SIlya Biryukov void test(bool input_var) {
4b8f231a4SIlya Biryukov   ID(input_var) = true;
5b8f231a4SIlya Biryukov   // Check that input_var shows up when completing at the start, in the middle
6b8f231a4SIlya Biryukov   // and at the end of the identifier.
7b8f231a4SIlya Biryukov   //
8*cf9b25e0SSam McCall   // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-4):6 %s -o - | FileCheck %s
9*cf9b25e0SSam McCall   // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-5):8 %s -o - | FileCheck %s
10*cf9b25e0SSam McCall   // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):15 %s -o - | FileCheck %s
11b8f231a4SIlya Biryukov 
12b8f231a4SIlya Biryukov   // CHECK: input_var
13b8f231a4SIlya Biryukov }
14