[PATCH] D58717: Added documentation for clangd v9+ features

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 27 08:00:03 PST 2019


gribozavr created this revision.
gribozavr added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, ioeric.
Herald added a project: clang.
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D58717

Files:
  clang-tools-extra/docs/clangd/Features.rst


Index: clang-tools-extra/docs/clangd/Features.rst
===================================================================
--- clang-tools-extra/docs/clangd/Features.rst
+++ clang-tools-extra/docs/clangd/Features.rst
@@ -38,6 +38,30 @@
 
 :raw-html:`</details>`
 
+**(New in v9)**
+If a missing symbol was seen in a file you've edited recently, clangd will
+suggest inserting it.
+
+clang-tidy checks
+-----------------
+
+**(New in v9)**
+clangd embeds `clang-tidy <https://clang.llvm.org/extra/clang-tidy/>`__
+which provides extra hints about code problems: bug-prone patterns,
+performance traps, and style issues.
+
+:raw-html:`<details><summary markdown="span">Animated demo</summary>`
+
+.. image:: ApplyClangTidyFixInVSCode.gif
+   :align: center
+   :alt: Applying a fix suggested by the compiler
+
+:raw-html:`</details>`
+
+clangd respects your project's ``.clang-tidy`` file which controls the checks
+to run. Not all checks work within clangd.  You must pass the ``-clang-tidy``
+flag to enable this feature.
+
 Code completion
 ===============
 
@@ -92,6 +116,9 @@
 If there is no project-wide index, cross-references work across the files
 you have opened.
 
+**(New in v9)**
+clangd will also automatically index your whole project.
+
 Find definition/declaration
 ---------------------------
 
@@ -105,6 +132,13 @@
 
 :raw-html:`</details>`
 
+**(New in v9)**
+Some editors only expose "find definition"; use "find definition" on the
+definition to jump to the declaration.
+
+"Find definition" also works on ``#include`` lines, to jump to the included
+file.
+
 Find references
 ---------------
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58717.188542.patch
Type: text/x-patch
Size: 1610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190227/771435a3/attachment.bin>


More information about the cfe-commits mailing list