[PATCH] D68024: [clangd] Implement GetEligiblePoints

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 06:52:16 PDT 2019


ilya-biryukov marked an inline comment as done.
ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/SourceCode.cpp:996
+  std::vector<std::string> Enclosing = {""};
+  // FIXME: In addition to namespaces try to generate events for function
+  // definitions as well. One might use a closing parantheses(")" followed by an
----------------
kadircet wrote:
> ilya-biryukov wrote:
> > If we were to do this, I'd rather try matching brace structure and only report `closing brace that is probably end of the top-level decl(function, struct, etc)` events.
> > 
> > Everything else seems super hard to get right.
> agreed, my suggestion was also just for figuring out when a `{` might start a definition, and trigger an event at the corresponding `}`
Actually, now I remembered that this should also work just fine.
`) {` is a good marker for start of the function body, I believe clang also uses this to detect and skip function bodies for members.

So LG 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68024





More information about the cfe-commits mailing list