forked from apple/swift-clang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeComplete] Properly determine qualifiers of 'this' in a lambda
Summary: The clang used to pick up the qualifiers of the lamba's call operator (which is always const) and fail to show non-const methods of 'this' in completion results. Reviewers: kadircet Reviewed By: kadircet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55885 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349655 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
c00ce7c
commit 30b7031
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
}; | ||
}; | ||
|
||
|