diff options
Diffstat (limited to 'test/CodeCompletion/this-quals.cpp')
-rw-r--r-- | test/CodeCompletion/this-quals.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeCompletion/this-quals.cpp b/test/CodeCompletion/this-quals.cpp new file mode 100644 index 0000000000000..eeaed00aa8571 --- /dev/null +++ b/test/CodeCompletion/this-quals.cpp @@ -0,0 +1,21 @@ +class foo { + void mut_func() { + [this]() { + + }(); + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:1 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // CHECK-CC1: const_func + // CHECK-CC1: mut_func + } + + void const_func() const { + [this]() { + + }(); + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:13:1 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s + // CHECK-CC2-NOT: mut_func + // CHECK-CC2: const_func + }; +}; + + |