Skip to content

Commit 4ea7488

Browse files
committed
[MLIR] Apply clang-tidy fixes for readability-identifier-naming in MLIRServer.cpp (NFC)
1 parent a9a05df commit 4ea7488

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ namespace {
10021002
class MLIRTextFile {
10031003
public:
10041004
MLIRTextFile(const lsp::URIForFile &uri, StringRef fileContents,
1005-
int64_t version, lsp::DialectRegistryFn registry_fn,
1005+
int64_t version, lsp::DialectRegistryFn registryFn,
10061006
std::vector<lsp::Diagnostic> &diagnostics);
10071007

10081008
/// Return the current version of this text file.
@@ -1051,9 +1051,9 @@ class MLIRTextFile {
10511051
} // namespace
10521052

10531053
MLIRTextFile::MLIRTextFile(const lsp::URIForFile &uri, StringRef fileContents,
1054-
int64_t version, lsp::DialectRegistryFn registry_fn,
1054+
int64_t version, lsp::DialectRegistryFn registryFn,
10551055
std::vector<lsp::Diagnostic> &diagnostics)
1056-
: context(registry_fn(uri), MLIRContext::Threading::DISABLED),
1056+
: context(registryFn(uri), MLIRContext::Threading::DISABLED),
10571057
contents(fileContents.str()), version(version) {
10581058
context.allowUnregisteredDialects();
10591059

@@ -1268,11 +1268,11 @@ MLIRTextFileChunk &MLIRTextFile::getChunkFor(lsp::Position &pos) {
12681268
//===----------------------------------------------------------------------===//
12691269

12701270
struct lsp::MLIRServer::Impl {
1271-
Impl(lsp::DialectRegistryFn registry_fn) : registry_fn(registry_fn) {}
1271+
Impl(lsp::DialectRegistryFn registryFn) : registryFn(registryFn) {}
12721272

12731273
/// The registry factory for containing dialects that can be recognized in
12741274
/// parsed .mlir files.
1275-
lsp::DialectRegistryFn registry_fn;
1275+
lsp::DialectRegistryFn registryFn;
12761276

12771277
/// The files held by the server, mapped by their URI file name.
12781278
llvm::StringMap<std::unique_ptr<MLIRTextFile>> files;
@@ -1282,15 +1282,15 @@ struct lsp::MLIRServer::Impl {
12821282
// MLIRServer
12831283
//===----------------------------------------------------------------------===//
12841284

1285-
lsp::MLIRServer::MLIRServer(lsp::DialectRegistryFn registry_fn)
1286-
: impl(std::make_unique<Impl>(registry_fn)) {}
1285+
lsp::MLIRServer::MLIRServer(lsp::DialectRegistryFn registryFn)
1286+
: impl(std::make_unique<Impl>(registryFn)) {}
12871287
lsp::MLIRServer::~MLIRServer() = default;
12881288

12891289
void lsp::MLIRServer::addOrUpdateDocument(
12901290
const URIForFile &uri, StringRef contents, int64_t version,
12911291
std::vector<llvm::lsp::Diagnostic> &diagnostics) {
12921292
impl->files[uri.file()] = std::make_unique<MLIRTextFile>(
1293-
uri, contents, version, impl->registry_fn, diagnostics);
1293+
uri, contents, version, impl->registryFn, diagnostics);
12941294
}
12951295

12961296
std::optional<int64_t> lsp::MLIRServer::removeDocument(const URIForFile &uri) {
@@ -1353,7 +1353,7 @@ void lsp::MLIRServer::getCodeActions(const URIForFile &uri, const Range &pos,
13531353

13541354
llvm::Expected<lsp::MLIRConvertBytecodeResult>
13551355
lsp::MLIRServer::convertFromBytecode(const URIForFile &uri) {
1356-
MLIRContext tempContext(impl->registry_fn(uri));
1356+
MLIRContext tempContext(impl->registryFn(uri));
13571357
tempContext.allowUnregisteredDialects();
13581358

13591359
// Collect any errors during parsing.

0 commit comments

Comments
 (0)