jroesch commented on a change in pull request #6162:
URL: https://github.com/apache/incubator-tvm/pull/6162#discussion_r463854884
##########
File path: src/parser/parser.cc
##########
@@ -427,8 +381,8 @@ class Parser {
Var LookupLocal(const Token& local) {
auto var = this->expr_scopes.Lookup(local.ToString());
if (!var.defined()) {
- diag_ctx.Emit(
- {local->line, local->column, "this local variable has not been
previously declared"});
+ diag_ctx->Emit({DiagnosticLevel::Error, local->span,
Review comment:
I want the interface to be defined over diagnostics, the builder is just
sugar for making it cleaner to report errors. I don't really want to freeze
anything yet given we haven't converted passes to using this yet and have not
seen all use cases. I changed the builder to be hidden you can now use
`Diagnostic::Error(span) << msg` in order to build diagnostics.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]