]> sourceware.org Git - systemtap.git/commitdiff
PR14927: elaborate.cxx: change a warning to use print_token()
authorJonathan Lebon <jlebon@redhat.com>
Tue, 25 Jun 2013 19:06:41 +0000 (15:06 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Fri, 28 Jun 2013 14:26:59 +0000 (10:26 -0400)
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

index d4925c6f9c1ced4109912540181d3a47dc4a8396..3e9ac71bec82f87a05ce31732cefde18327b6db1 100644 (file)
@@ -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;
This page took 0.035254 seconds and 5 git commands to generate.