From 2decd476c13dbdf87c9c48addd083545c81468eb Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 25 Jun 2013 15:06:41 -0400 Subject: [PATCH] PR14927: elaborate.cxx: change a warning to use print_token() To be more consistent with other print_warning() calls in the file, this warning was changed to use its second overloaded form, in which the token is given as the second argument. This has for effect to allow proper pretty printing of the token using print_token(), thus making sure that the path is not repeated and that output is coloured if necessary. --- elaborate.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elaborate.cxx b/elaborate.cxx index d4925c6f9..3e9ac71be 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -2577,7 +2577,7 @@ dead_assignment_remover::visit_assignment (assignment* e) else */ if (e->left->tok->location.file->name == session.user_file->name) // !tapset - session.print_warning(_F("Eliding assignment to %s at %s", leftvar->name.c_str(), lex_cast(*e->tok).c_str())); + session.print_warning(_F("Eliding assignment to '%s'", leftvar->name.c_str()), e->tok); provide (e->right); // goodbye assignment* relaxed_p = false; return; -- 2.43.5