Skip to content

Commit ccb3e93

Browse files
committed
Fix merge
1 parent 513e111 commit ccb3e93

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/Feature/Hover.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ static std::string print_type(const clang::TemplateTemplateParmDecl* TTP,
9797
}
9898

9999
static std::vector<HoverItem> get_hover_items(CompilationUnitRef unit,
100-
>>>>>>> 7c3c815 (Refactor ut, misc patch on type deducing)
101100
const clang::NamedDecl* decl,
102101
const config::HoverOptions& opt) {
103102
clang::ASTContext& ctx = unit.context();
@@ -196,19 +195,6 @@ static std::string get_source_code(CompilationUnitRef unit, clang::SourceRange r
196195
lo)};
197196
}
198197

199-
// Get all source code
200-
static std::string get_source_code(CompilationUnitRef unit, clang::SourceRange range) {
201-
clang::LangOptions lo;
202-
auto& sm = unit.context().getSourceManager();
203-
auto start_loc = sm.getSpellingLoc(range.getBegin());
204-
auto last_token_loc = sm.getSpellingLoc(range.getEnd());
205-
auto end_loc = clang::Lexer::getLocForEndOfToken(last_token_loc, 0, sm, lo);
206-
return std::string{clang::Lexer::getSourceText(
207-
clang::CharSourceRange::getCharRange(clang::SourceRange{start_loc, end_loc}),
208-
sm,
209-
lo)};
210-
}
211-
212198
static clang::TemplateTypeParmTypeLoc getContainedAutoParamType(clang::TypeLoc TL) {
213199
if(auto QTL = TL.getAs<clang::QualifiedTypeLoc>())
214200
return getContainedAutoParamType(QTL.getUnqualifiedLoc());
@@ -411,19 +397,6 @@ static std::optional<clang::QualType> getDeducedType(clang::ASTContext& ASTCtx,
411397
return V.DeducedType;
412398
}
413399

414-
// Get all source code
415-
static std::string get_source_code(CompilationUnitRef unit, clang::SourceRange range) {
416-
clang::LangOptions lo;
417-
auto& sm = unit.context().getSourceManager();
418-
auto start_loc = sm.getSpellingLoc(range.getBegin());
419-
auto last_token_loc = sm.getSpellingLoc(range.getEnd());
420-
auto end_loc = clang::Lexer::getLocForEndOfToken(last_token_loc, 0, sm, lo);
421-
return std::string{clang::Lexer::getSourceText(
422-
clang::CharSourceRange::getCharRange(clang::SourceRange{start_loc, end_loc}),
423-
sm,
424-
lo)};
425-
}
426-
427400
// TODO: How does clangd put together decl, name, scope and sometimes initialized value?
428401
// ```
429402
// // scope

0 commit comments

Comments
 (0)