[PATCH] D71422: [clangd] Introduce bulletlists

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 13 00:50:20 PST 2019


sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/FormattedString.h:65
 
+/// Prints a list of documents while prepending "- " marker. Also indents the
+/// documents.
----------------
This is a class, not a function - comment should focus on what it *is*.


================
Comment at: clang-tools-extra/clangd/FormattedString.h:95
 
+  /// Causes every line of the document to be indented by 2 spaces. Except the
+  /// first line, it is containers responsibility to adjust padding for first
----------------
Why is it the responsibility of this class to keep track of its indentation within the parent?
This seems like it should be a parameter to the render functions, rather than state.

BTW, it appears to be legal to write lists as:
```
-
  this is the
  first item
-
  second item
```
Which is much easier/more regular to generate, because it doesn't require `Document` to special-case the first line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71422





More information about the cfe-commits mailing list