Skip to content

Commit 550fad4

Browse files
author
git apple-llvm automerger
committed
Merge commit 'a8c88de0dff8' from llvm.org/main into next
2 parents 3c0cc7b + a8c88de commit 550fad4

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

mlir/include/mlir/Tools/lsp-server-support/Transport.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ class JSONTransport {
9595
template <typename T>
9696
using Callback = llvm::unique_function<void(llvm::Expected<T>)>;
9797

98-
/// An OutgoingMessage<T> is a function used for outgoing requests or
99-
/// notifications to send to the client.
98+
/// An OutgoingNotification<T> is a function used for outgoing notifications
99+
/// send to the client.
100100
template <typename T>
101-
using OutgoingMessage = llvm::unique_function<void(const T &)>;
101+
using OutgoingNotification = llvm::unique_function<void(const T &)>;
102102

103103
/// A handler used to process the incoming transport messages.
104104
class MessageHandler {
@@ -160,10 +160,9 @@ class MessageHandler {
160160
};
161161
}
162162

163-
/// Create an OutgoingMessage function that, when called, sends a notification
164-
/// with the given method via the transport.
163+
/// Create an OutgoingNotification object used for the given method.
165164
template <typename T>
166-
OutgoingMessage<T> outgoingNotification(llvm::StringLiteral method) {
165+
OutgoingNotification<T> outgoingNotification(llvm::StringLiteral method) {
167166
return [&, method](const T &params) {
168167
std::lock_guard<std::mutex> transportLock(transportOutputMutex);
169168
Logger::info("--> {0}", method);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct LSPServer {
9191

9292
/// An outgoing notification used to send diagnostics to the client when they
9393
/// are ready to be processed.
94-
OutgoingMessage<PublishDiagnosticsParams> publishDiagnostics;
94+
OutgoingNotification<PublishDiagnosticsParams> publishDiagnostics;
9595

9696
/// Used to indicate that the 'shutdown' request was received from the
9797
/// Language Server client.

mlir/lib/Tools/mlir-pdll-lsp-server/LSPServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct LSPServer {
104104

105105
/// An outgoing notification used to send diagnostics to the client when they
106106
/// are ready to be processed.
107-
OutgoingMessage<PublishDiagnosticsParams> publishDiagnostics;
107+
OutgoingNotification<PublishDiagnosticsParams> publishDiagnostics;
108108

109109
/// Used to indicate that the 'shutdown' request was received from the
110110
/// Language Server client.

mlir/lib/Tools/tblgen-lsp-server/LSPServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct LSPServer {
7272

7373
/// An outgoing notification used to send diagnostics to the client when they
7474
/// are ready to be processed.
75-
OutgoingMessage<PublishDiagnosticsParams> publishDiagnostics;
75+
OutgoingNotification<PublishDiagnosticsParams> publishDiagnostics;
7676

7777
/// Used to indicate that the 'shutdown' request was received from the
7878
/// Language Server client.

0 commit comments

Comments
 (0)