diff options
Diffstat (limited to 'clang/test/CodeCompletion/inside-macros.cpp')
-rw-r--r-- | clang/test/CodeCompletion/inside-macros.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/inside-macros.cpp b/clang/test/CodeCompletion/inside-macros.cpp new file mode 100644 index 00000000000..dc40c6ad318 --- /dev/null +++ b/clang/test/CodeCompletion/inside-macros.cpp @@ -0,0 +1,13 @@ +#define ID(X) X + +void test(bool input_var) { + ID(input_var) = true; + // Check that input_var shows up when completing at the start, in the middle + // and at the end of the identifier. + // + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:6 %s -o - | FileCheck %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:8 %s -o - | FileCheck %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:15 %s -o - | FileCheck %s + + // CHECK: input_var +} |