Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/DiagnosticDriverKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def err_drv_command_failure : Error<
"unable to execute command: %0">;
def err_drv_invalid_darwin_version : Error<
"invalid Darwin version number: %0">;
def err_drv_invalid_diagnotics_hotness_threshold : Error<
def err_drv_invalid_diagnostics_hotness_threshold : Error<
"invalid argument in '%0', only integer or 'auto' is supported">;
def err_drv_invalid_diagnotics_misexpect_tolerance : Error<
def err_drv_invalid_diagnostics_misexpect_tolerance : Error<
"invalid argument in '%0', only integers are supported">;
def err_drv_missing_argument : Error<
"argument to '%0' is missing (expected %1 value%s1)">;
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2219,7 +2219,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
llvm::remarks::parseHotnessThresholdOption(arg->getValue());

if (!ResultOrErr) {
Diags.Report(diag::err_drv_invalid_diagnotics_hotness_threshold)
Diags.Report(diag::err_drv_invalid_diagnostics_hotness_threshold)
<< "-fdiagnostics-hotness-threshold=";
} else {
Opts.DiagnosticsHotnessThreshold = *ResultOrErr;
Expand All @@ -2236,7 +2236,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
auto ResultOrErr = parseToleranceOption(arg->getValue());

if (!ResultOrErr) {
Diags.Report(diag::err_drv_invalid_diagnotics_misexpect_tolerance)
Diags.Report(diag::err_drv_invalid_diagnostics_misexpect_tolerance)
<< "-fdiagnostics-misexpect-tolerance=";
} else {
Opts.DiagnosticsMisExpectTolerance = *ResultOrErr;
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void printDefBlockName(raw_ostream &os,
}

/// Convert the given MLIR diagnostic to the LSP form.
static lsp::Diagnostic getLspDiagnoticFromDiag(llvm::SourceMgr &sourceMgr,
static lsp::Diagnostic getLspDiagnosticFromDiag(llvm::SourceMgr &sourceMgr,
Diagnostic &diag,
const lsp::URIForFile &uri) {
lsp::Diagnostic lspDiag;
Expand Down Expand Up @@ -342,7 +342,7 @@ MLIRDocument::MLIRDocument(MLIRContext &context, const lsp::URIForFile &uri,
StringRef contents,
std::vector<lsp::Diagnostic> &diagnostics) {
ScopedDiagnosticHandler handler(&context, [&](Diagnostic &diag) {
diagnostics.push_back(getLspDiagnoticFromDiag(sourceMgr, diag, uri));
diagnostics.push_back(getLspDiagnosticFromDiag(sourceMgr, diag, uri));
});

// Try to parsed the given IR string.
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static lsp::Location getLocationFromLoc(llvm::SourceMgr &mgr, SMRange range,

/// Convert the given MLIR diagnostic to the LSP form.
static std::optional<lsp::Diagnostic>
getLspDiagnoticFromDiag(llvm::SourceMgr &sourceMgr, const ast::Diagnostic &diag,
getLspDiagnosticFromDiag(llvm::SourceMgr &sourceMgr, const ast::Diagnostic &diag,
const lsp::URIForFile &uri) {
lsp::Diagnostic lspDiag;
lspDiag.source = "pdll";
Expand Down Expand Up @@ -390,7 +390,7 @@ PDLDocument::PDLDocument(const lsp::URIForFile &uri, StringRef contents,
sourceMgr.AddNewSourceBuffer(std::move(memBuffer), SMLoc());

astContext.getDiagEngine().setHandlerFn([&](const ast::Diagnostic &diag) {
if (auto lspDiag = getLspDiagnoticFromDiag(sourceMgr, diag, uri))
if (auto lspDiag = getLspDiagnosticFromDiag(sourceMgr, diag, uri))
diagnostics.push_back(std::move(*lspDiag));
});
astModule = parsePDLLAST(astContext, sourceMgr, /*enableDocumentation=*/true);
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Tools/tblgen-lsp-server/TableGenServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static lsp::Location getLocationFromLoc(llvm::SourceMgr &mgr, SMLoc loc,

/// Convert the given TableGen diagnostic to the LSP form.
static std::optional<lsp::Diagnostic>
getLspDiagnoticFromDiag(const llvm::SMDiagnostic &diag,
getLspDiagnosticFromDiag(const llvm::SMDiagnostic &diag,
const lsp::URIForFile &uri) {
auto *sourceMgr = const_cast<llvm::SourceMgr *>(diag.getSourceMgr());
if (!sourceMgr || !diag.getLoc().isValid())
Expand Down Expand Up @@ -457,7 +457,7 @@ void TableGenTextFile::initialize(const lsp::URIForFile &uri,
sourceMgr.setDiagHandler(
[](const llvm::SMDiagnostic &diag, void *rawHandlerContext) {
auto *ctx = reinterpret_cast<DiagHandlerContext *>(rawHandlerContext);
if (auto lspDiag = getLspDiagnoticFromDiag(diag, ctx->uri))
if (auto lspDiag = getLspDiagnosticFromDiag(diag, ctx->uri))
ctx->diagnostics.push_back(*lspDiag);
},
&handlerContext);
Expand Down