Skip to content

Commit 8e567b0

Browse files
committed
[clangd] Revert define-inline action changes to un-break windows build-bots
1 parent b85b4e5 commit 8e567b0

File tree

8 files changed

+21
-1159
lines changed

8 files changed

+21
-1159
lines changed

clang-tools-extra/clangd/ClangdServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ tweakSelection(const Range &Sel, const InputsAndAST &AST) {
367367
auto End = positionToOffset(AST.Inputs.Contents, Sel.end);
368368
if (!End)
369369
return End.takeError();
370-
return Tweak::Selection(AST.Inputs.Index, AST.AST, *Begin, *End);
370+
return Tweak::Selection(AST.AST, *Begin, *End);
371371
}
372372

373373
void ClangdServer::enumerateTweaks(PathRef File, Range Sel,

clang-tools-extra/clangd/refactor/Tweak.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "Logger.h"
1010
#include "Path.h"
1111
#include "SourceCode.h"
12-
#include "index/Index.h"
1312
#include "llvm/ADT/None.h"
1413
#include "llvm/ADT/Optional.h"
1514
#include "llvm/ADT/STLExtras.h"
@@ -45,10 +44,9 @@ void validateRegistry() {
4544
}
4645
} // namespace
4746

48-
Tweak::Selection::Selection(const SymbolIndex *Index, ParsedAST &AST,
49-
unsigned RangeBegin, unsigned RangeEnd)
50-
: Index(Index), AST(AST), SelectionBegin(RangeBegin),
51-
SelectionEnd(RangeEnd),
47+
Tweak::Selection::Selection(ParsedAST &AST, unsigned RangeBegin,
48+
unsigned RangeEnd)
49+
: AST(AST), SelectionBegin(RangeBegin), SelectionEnd(RangeEnd),
5250
ASTSelection(AST.getASTContext(), AST.getTokens(), RangeBegin, RangeEnd) {
5351
auto &SM = AST.getSourceManager();
5452
Code = SM.getBufferData(SM.getMainFileID());

clang-tools-extra/clangd/refactor/Tweak.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "Protocol.h"
2525
#include "Selection.h"
2626
#include "SourceCode.h"
27-
#include "index/Index.h"
2827
#include "clang/Tooling/Core/Replacement.h"
2928
#include "llvm/ADT/Optional.h"
3029
#include "llvm/ADT/StringMap.h"
@@ -47,12 +46,9 @@ class Tweak {
4746
public:
4847
/// Input to prepare and apply tweaks.
4948
struct Selection {
50-
Selection(const SymbolIndex *Index, ParsedAST &AST, unsigned RangeBegin,
51-
unsigned RangeEnd);
49+
Selection(ParsedAST &AST, unsigned RangeBegin, unsigned RangeEnd);
5250
/// The text of the active document.
5351
llvm::StringRef Code;
54-
/// The Index for handling codebase related queries.
55-
const SymbolIndex *Index = nullptr;
5652
/// Parsed AST of the active file.
5753
ParsedAST *
5854
/// A location of the cursor in the editor.

clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ set(LLVM_LINK_COMPONENTS
1414
add_clang_library(clangDaemonTweaks OBJECT
1515
AnnotateHighlightings.cpp
1616
DumpAST.cpp
17-
DefineInline.cpp
1817
ExpandAutoType.cpp
1918
ExpandMacro.cpp
2019
ExtractFunction.cpp

0 commit comments

Comments
 (0)