hokein created this revision.
hokein added a reviewer: kadircet.
Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov.
Herald added a project: clang.
This would allow clangd-indexer runs on chromium repo.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D59022
Files:
clangd/indexer/IndexerMain.cpp
Index: clangd/indexer/IndexerMain.cpp
===================================================================
--- clangd/indexer/IndexerMain.cpp
+++ clangd/indexer/IndexerMain.cpp
@@ -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 @@
// 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";
}
Index: clangd/indexer/IndexerMain.cpp
===================================================================
--- clangd/indexer/IndexerMain.cpp
+++ clangd/indexer/IndexerMain.cpp
@@ -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 @@
// 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";
}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits