[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 25 00:17:12 PDT 2019


jvikstrom marked an inline comment as done.
jvikstrom added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:75
+  SemanticSymbolASTCollector Collector(Ctx);
+  Collector.TraverseAST(Ctx);
+  return Collector.getSymbols();
----------------
jvikstrom wrote:
> hokein wrote:
> > let's move the above lines into `SemanticSymbolASTCollector`, we can define a new method "collectTokens()".
> Should I expose the entire class or keep the getSemanticHighlights function?  (I'm just thinking that RecursiveASTVisitor contains a lot of public functions which makes it not super obvious which function to call to get semantic highlight things when looking at autocomplete)
Actually I can just do private inheritance and declare RecursiveASTVisitor<SemanticSymbolASTCollector> to be a friend.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63559





More information about the cfe-commits mailing list