[PATCH] D59205: [clangd] Respect Origin option in createStaticIndexingAction

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 04:07:32 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE355820: [clangd] Respect Origin option in createStaticIndexingAction (authored by kadircet, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D59205?vs=190062&id=190066#toc

Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D59205

Files:
  clangd/index/IndexAction.cpp
  clangd/index/IndexAction.h


Index: clangd/index/IndexAction.h
===================================================================
--- clangd/index/IndexAction.h
+++ clangd/index/IndexAction.h
@@ -22,7 +22,7 @@
 //   - include paths are always collected, and canonicalized appropriately
 //   - references are always counted
 //   - all references are collected (if RefsCallback is non-null)
-//   - the symbol origin is always Static
+//   - the symbol origin is set to Static if not specified by caller
 std::unique_ptr<FrontendAction> createStaticIndexingAction(
     SymbolCollector::Options Opts,
     std::function<void(SymbolSlab)> SymbolsCallback,
Index: clangd/index/IndexAction.cpp
===================================================================
--- clangd/index/IndexAction.cpp
+++ clangd/index/IndexAction.cpp
@@ -183,7 +183,8 @@
       index::IndexingOptions::SystemSymbolFilterKind::All;
   Opts.CollectIncludePath = true;
   Opts.CountReferences = true;
-  Opts.Origin = SymbolOrigin::Static;
+  if (Opts.Origin == SymbolOrigin::Unknown)
+    Opts.Origin = SymbolOrigin::Static;
   Opts.StoreAllDocumentation = false;
   if (RefsCallback != nullptr) {
     Opts.RefFilter = RefKind::All;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59205.190066.patch
Type: text/x-patch
Size: 1178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190311/bd15a84c/attachment-0001.bin>


More information about the cfe-commits mailing list