[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
This commit is contained in:
Haojian Wu 2019-03-07 14:47:17 +00:00
parent e2ddb2ad1d
commit ea18b36a6d
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@
#include "index/Serialization.h"
#include "index/Symbol.h"
#include "index/SymbolCollector.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Execution.h"
#include "clang/Tooling/Tooling.h"
@ -110,7 +111,8 @@ int main(int argc, const char **argv) {
// Collect symbols found in each translation unit, merging as we go.
clang::clangd::IndexFileIn Data;
auto Err = Executor->get()->execute(
llvm::make_unique<clang::clangd::IndexActionFactory>(Data));
llvm::make_unique<clang::clangd::IndexActionFactory>(Data),
clang::tooling::getStripPluginsAdjuster());
if (Err) {
llvm::errs() << llvm::toString(std::move(Err)) << "\n";
}