Skip to content

Commit ea18b36

Browse files
committed
[clangd] Strip plugin arguments in clangd-indexer.
Summary: This would allow clangd-indexer runs on chromium repo. Reviewers: kadircet Reviewed By: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59022 llvm-svn: 355599
1 parent e2ddb2a commit ea18b36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang-tools-extra/clangd/indexer/IndexerMain.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "index/Serialization.h"
1717
#include "index/Symbol.h"
1818
#include "index/SymbolCollector.h"
19+
#include "clang/Tooling/ArgumentsAdjusters.h"
1920
#include "clang/Tooling/CommonOptionsParser.h"
2021
#include "clang/Tooling/Execution.h"
2122
#include "clang/Tooling/Tooling.h"
@@ -110,7 +111,8 @@ int main(int argc, const char **argv) {
110111
// Collect symbols found in each translation unit, merging as we go.
111112
clang::clangd::IndexFileIn Data;
112113
auto Err = Executor->get()->execute(
113-
llvm::make_unique<clang::clangd::IndexActionFactory>(Data));
114+
llvm::make_unique<clang::clangd::IndexActionFactory>(Data),
115+
clang::tooling::getStripPluginsAdjuster());
114116
if (Err) {
115117
llvm::errs() << llvm::toString(std::move(Err)) << "\n";
116118
}

0 commit comments

Comments
 (0)