[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-16 Thread Tom Praschan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0e00611cbc2b: [clangd] Add heuristic for dropping snippet when completing member function… (authored by tom-anders). Repository: rG LLVM Github

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-14 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137040#3924115 , @nridge wrote: > Thanks! Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-13 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-13 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474990. tom-anders added a comment. Clean up test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files: clang-tools-extra/clangd/CodeComplete.cpp

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks! In D137040#3918118 , @tom-anders wrote: > now we kinda have the same test case duplicated in sema and clangd tests - I > guess for clangd we now actually only have to test that the SnippetSuffix is > cleared when

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-11 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474818. tom-anders added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files: clang-tools-extra/clangd/CodeComplete.cpp

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. Hmm I added the test for the flag to Sema, but now we kinda have the same test case duplicated in sema and clangd tests - I guess for clangd we now actually only have to test that the SnippetSuffix is cleared when FunctionCanBeCall is true, but I don't see an easy

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-09 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 474358. tom-anders added a comment. Add test to sema Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files: clang-tools-extra/clangd/CodeComplete.cpp

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D137040#3909906 , @tom-anders wrote: > We now probably also need a unit test for Sema that tests the new flag, right? Good point. My understanding is that most test coverage of libSema's code completion takes the form of lit

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. The test in clangd/unittests/CodeCompleteTests.cpp still passes. We now probably also need a unit test for Sema that tests the new flag, right? Comment at: clang-tools-extra/clangd/CodeComplete.cpp:414 , IsPattern); + if

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-05 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders updated this revision to Diff 473408. tom-anders added a comment. Herald added a project: clang. Move logic to SemaCodeComplete.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137040/new/ https://reviews.llvm.org/D137040 Files:

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-04 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders added a comment. In D137040#3907497 , @nridge wrote: > Thanks for the patch! > > The test looks good to me. > > As for the fix, I wonder if it would make sense to implement it in the Sema > layer rather than in clangd. For example, we could

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for the patch! The test looks good to me. As for the fix, I wonder if it would make sense to implement it in the Sema layer rather than in clangd. For example, we could give `clang::CodeCompletionResult` a new flag

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-10-30 Thread Tom Praschan via Phabricator via cfe-commits
tom-anders created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. tom-anders requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This implements the 1st heuristic