[PATCH] D88553: [clangd] Start using SyntaxTrees for folding ranges feature

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 07:10:15 PDT 2020


gribozavr2 added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Tree.h:172-174
   /// Find the first node with a corresponding role.
   Node *findChild(NodeRole R);
+  const Node *findChild(NodeRole R) const;
----------------
eduucaldas wrote:
> I think that makes sense, since all the functions used by `findChild` are public anyways.
> 
> WDYT Dmitri? Now that the API is being used I realize its surface ^^. Perhaps we should pour some thought into that in the future :) 
> 
I think it makes sense. Const-correctness often creates this type of API duplication.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88553



More information about the cfe-commits mailing list