File tree Expand file tree Collapse file tree 8 files changed +21
-1159
lines changed Expand file tree Collapse file tree 8 files changed +21
-1159
lines changed Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ tweakSelection(const Range &Sel, const InputsAndAST &AST) {
367
367
auto End = positionToOffset (AST.Inputs .Contents , Sel.end );
368
368
if (!End)
369
369
return End.takeError ();
370
- return Tweak::Selection (AST.Inputs . Index , AST. AST , *Begin, *End);
370
+ return Tweak::Selection (AST.AST , *Begin, *End);
371
371
}
372
372
373
373
void ClangdServer::enumerateTweaks (PathRef File, Range Sel,
Original file line number Diff line number Diff line change 9
9
#include " Logger.h"
10
10
#include " Path.h"
11
11
#include " SourceCode.h"
12
- #include " index/Index.h"
13
12
#include " llvm/ADT/None.h"
14
13
#include " llvm/ADT/Optional.h"
15
14
#include " llvm/ADT/STLExtras.h"
@@ -45,10 +44,9 @@ void validateRegistry() {
45
44
}
46
45
} // namespace
47
46
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),
52
50
ASTSelection (AST.getASTContext(), AST.getTokens(), RangeBegin, RangeEnd) {
53
51
auto &SM = AST.getSourceManager ();
54
52
Code = SM.getBufferData (SM.getMainFileID ());
Original file line number Diff line number Diff line change 24
24
#include " Protocol.h"
25
25
#include " Selection.h"
26
26
#include " SourceCode.h"
27
- #include " index/Index.h"
28
27
#include " clang/Tooling/Core/Replacement.h"
29
28
#include " llvm/ADT/Optional.h"
30
29
#include " llvm/ADT/StringMap.h"
@@ -47,12 +46,9 @@ class Tweak {
47
46
public:
48
47
// / Input to prepare and apply tweaks.
49
48
struct Selection {
50
- Selection (const SymbolIndex *Index, ParsedAST &AST, unsigned RangeBegin,
51
- unsigned RangeEnd);
49
+ Selection (ParsedAST &AST, unsigned RangeBegin, unsigned RangeEnd);
52
50
// / The text of the active document.
53
51
llvm::StringRef Code;
54
- // / The Index for handling codebase related queries.
55
- const SymbolIndex *Index = nullptr ;
56
52
// / Parsed AST of the active file.
57
53
ParsedAST *
58
54
// / A location of the cursor in the editor.
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ set(LLVM_LINK_COMPONENTS
14
14
add_clang_library (clangDaemonTweaks OBJECT
15
15
AnnotateHighlightings.cpp
16
16
DumpAST.cpp
17
- DefineInline.cpp
18
17
ExpandAutoType.cpp
19
18
ExpandMacro.cpp
20
19
ExtractFunction.cpp
You can’t perform that action at this time.
0 commit comments