[PATCH] D47065: [clangd] Enable parsing of non-doxygen comments in global-symbol-builder

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 18 07:05:41 PDT 2018


ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: jkorous, MaskRay, klimek.

Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47065

Files:
  clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp


Index: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
===================================================================
--- clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
+++ clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
@@ -73,6 +73,12 @@
         return WrapperFrontendAction::CreateASTConsumer(CI, InFile);
       }
 
+      bool BeginInvocation(CompilerInstance &CI) override {
+        // We want all comments, not just the doxygen ones.
+        CI.getLangOpts().CommentOpts.ParseAllComments = true;
+        return WrapperFrontendAction::BeginInvocation(CI);
+      }
+
       void EndSourceFileAction() override {
         WrapperFrontendAction::EndSourceFileAction();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47065.147502.patch
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180518/5dd8f11c/attachment.bin>


More information about the cfe-commits mailing list