[PATCH] D61537: [clangd] Boost code completion results that were named in the last few lines.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 3 14:17:28 PDT 2019


sammccall created this revision.
Herald added subscribers: cfe-commits, kadircet, jfb, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

The hope is this will catch a few patterns with repetition:

  SomeClass* S = ^SomeClass::Create()
  
  int getFrobnicator() { return ^frobnicator_; }
  
  // discard the factory, it's no longer valid.
  ^MyFactory.reset();

Without triggering antipatterns too often:

  return Point(x.first, x.^second);

I'm going to gather some data on whether this turns out to be a win overall.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D61537

Files:
  clangd/CodeComplete.cpp
  clangd/FindSymbols.cpp
  clangd/Quality.cpp
  clangd/Quality.h
  clangd/SourceCode.cpp
  clangd/SourceCode.h
  clangd/test/completion-auto-trigger.test
  clangd/unittests/CodeCompleteTests.cpp
  clangd/unittests/QualityTests.cpp
  clangd/unittests/SourceCodeTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61537.198086.patch
Type: text/x-patch
Size: 14138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190503/a199faf9/attachment-0001.bin>


More information about the cfe-commits mailing list