Skip to content

Commit c5f0002

Browse files
committed
Fix logger api
1 parent 15cabe5 commit c5f0002

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

include/Feature/Hover.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ struct Hover {
6666
};
6767

6868
// /// Generate the hover information for the given declaration(for test).
69-
// Hover hover(CompilationUnit& unit, const clang::NamedDecl* decl, const config::HoverOptions& opt);
69+
// Hover hover(CompilationUnit& unit, const clang::NamedDecl* decl, const config::HoverOptions&
70+
// opt);
7071

7172
/// Generate the hover information for the symbol at the given offset.
72-
std::optional<Hover> hover(CompilationUnit& unit, std::uint32_t offset, const config::HoverOptions& opt);
73+
std::optional<Hover> hover(CompilationUnit& unit,
74+
std::uint32_t offset,
75+
const config::HoverOptions& opt);
7376

7477
} // namespace clice::feature

src/Feature/Hover.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "Support/Compare.h"
77
#include "Support/Ranges.h"
88
#include "Feature/Hover.h"
9-
#include "Support/Logger.h"
9+
#include "Support/Logging.h"
1010

1111
namespace clice::feature {
1212

@@ -99,7 +99,7 @@ static std::optional<Hover> hover(CompilationUnit& unit,
9999
const clang::TypeLoc* typeloc,
100100
const config::HoverOptions& opt) {
101101
// TODO: Hover for type
102-
clice::log::warn("Hit a typeloc");
102+
clice::logging::warn("Hit a typeloc");
103103
return std::nullopt;
104104
}
105105

@@ -114,7 +114,7 @@ std::optional<Hover> hover(CompilationUnit& unit,
114114

115115
auto tokens_under_cursor = unit.spelled_tokens_touch(*loc);
116116
for(auto& tk: tokens_under_cursor) {
117-
clice::log::info("Hit token '{}'", tk.str());
117+
clice::logging::info("Hit token '{}'", tk.str());
118118
}
119119

120120
// Find the token under cursor
@@ -133,7 +133,7 @@ std::optional<Hover> hover(CompilationUnit& unit,
133133
return hover(unit, typeloc, opt);
134134
}
135135

136-
clice::log::warn("Not selected");
136+
clice::logging::warn("Not selected");
137137

138138
node->data.dump(llvm::errs(), unit.context());
139139

@@ -147,7 +147,7 @@ std::optional<Hover> hover(CompilationUnit& unit,
147147
/// - NestedNameSpecifierLoc
148148
/// - Template specification
149149
} else {
150-
clice::log::warn("Not an ast node");
150+
clice::logging::warn("Not an ast node");
151151
}
152152

153153
return std::nullopt;

0 commit comments

Comments
 (0)