[clang-tools-extra] r355599 - [clangd] Strip plugin arguments in clangd-indexer.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 7 06:47:17 PST 2019
Author: hokein
Date: Thu Mar 7 06:47:17 2019
New Revision: 355599
URL: http://llvm.org/viewvc/llvm-project?rev=355599&view=rev
Log:
[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
Modified:
clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp
Modified: clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp?rev=355599&r1=355598&r2=355599&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp (original)
+++ clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp Thu Mar 7 06:47:17 2019
@@ -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";
}
More information about the cfe-commits
mailing list