Fix some minor errors in diagnostic text. (#3047)

This commit is contained in:
Richard Smith
2023-08-02 18:17:16 +00:00
committed by GitHub
parent 0c33dead70
commit 90d2d7ef65
8 changed files with 10 additions and 9 deletions
+3 -2
View File
@@ -91,7 +91,8 @@ auto SemanticsContext::DiagnoseDuplicateName(ParseTree::Node parse_node,
auto SemanticsContext::DiagnoseNameNotFound(ParseTree::Node parse_node,
SemanticsStringId name_id) -> void {
CARBON_DIAGNOSTIC(NameNotFound, Error, "Name {0} not found", llvm::StringRef);
CARBON_DIAGNOSTIC(NameNotFound, Error, "Name `{0}` not found",
llvm::StringRef);
emitter_->Emit(parse_node, NameNotFound, semantics_ir_->GetString(name_id));
}
@@ -304,7 +305,7 @@ auto SemanticsContext::ImplicitAsForArgs(
ImplicitAsKind::Incompatible) {
CARBON_CHECK(diagnostic != nullptr) << "Should have validated first";
CARBON_DIAGNOSTIC(CallArgTypeMismatch, Note,
"Function cannot be used: Cannot implicityly convert "
"Function cannot be used: Cannot implicitly convert "
"argument {0} from `{1}` to `{2}`.",
size_t, std::string, std::string);
diagnostic->Note(param_parse_node, CallArgTypeMismatch, i,