This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push:
new 72b3808 Fix newer GCC compiler warnings. (#6257)
72b3808 is described below
commit 72b3808569255bd5705c3dfe60ae4a32f0933839
Author: Balint Cristian <[email protected]>
AuthorDate: Wed Aug 12 18:50:16 2020 +0300
Fix newer GCC compiler warnings. (#6257)
---
src/parser/parser.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/parser/parser.cc b/src/parser/parser.cc
index 7877245..71d4304 100644
--- a/src/parser/parser.cc
+++ b/src/parser/parser.cc
@@ -664,7 +664,7 @@ class Parser {
auto global = GlobalVar(global_name);
try {
global_names.Add(global_name, global);
- } catch (DuplicateKeyError e) {
+ } catch (const DuplicateKeyError& e) {
this->diag_ctx->Emit(Diagnostic::Error(global_tok->span) << "a
function with the name "
<< "`@"
<< global_name << "` "
<< "was
previously defined");
@@ -703,7 +703,7 @@ class Parser {
try {
type_names.Add(type_id, type_global);
- } catch (DuplicateKeyError e) {
+ } catch (const DuplicateKeyError& e) {
this->diag_ctx->Emit(Diagnostic::Error(type_tok->span) << "a type
definition with the name "
<< "`" << type_id
<< "` "
<< "was
previously defined");
@@ -747,7 +747,7 @@ class Parser {
try {
this->ctors.Add(ctor_name, ctor);
- } catch (DuplicateKeyError e) {
+ } catch (const DuplicateKeyError& e) {
this->diag_ctx->EmitFatal(Diagnostic::Error(ctor_tok->span)
<< "a constructor with the name "
<< "`" << ctor_name << "` "
@@ -1341,7 +1341,7 @@ class Parser {
DLOG(INFO) << "op_name=" << op_name << " token=" << tok;
try {
return Op::Get(op_name);
- } catch (dmlc::Error e) {
+ } catch (const dmlc::Error& e) {
this->diag_ctx->Emit(Diagnostic::Error(tok->span)
<< "operator `" << op_name
<< "` not found, perhaps you forgot to register
it?");