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

Tom Praschan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 5 02:29:15 PDT 2022


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
                    &Completion.RequiredQualifier, IsPattern);
+      if (!C.SemaResult->FunctionCanBeCall)
+        S.SnippetSuffix.clear();
----------------
Here, the SnippetSuffix is still created and then immediately cleared again. But the logic inside getSignature is quite complex and it's used in multiple places, so I didn't really want to touch that function for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137040/new/

https://reviews.llvm.org/D137040



More information about the cfe-commits mailing list