]> sourceware.org Git - systemtap.git/commitdiff
tweak error message for exhausted-overloaded-functions
authorFrank Ch. Eigler <fche@redhat.com>
Thu, 1 Sep 2016 21:28:37 +0000 (17:28 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 1 Sep 2016 21:28:37 +0000 (17:28 -0400)
Correct the error message generated for "all functions exhausted" to
focus on the token of the function-call site, rather than whatever
inner statement was last executed before a "next".

translate.cxx

index 73efcb95e28f018070402415d772b970f0cc453b..118ba1e02b91cf744948fa111aff88154583ff57 100644 (file)
@@ -5564,7 +5564,10 @@ c_unparser::visit_functioncall (functioncall* e)
 
   if (e->referents.back()->has_next)
     // check for aborted return from function; this could happen from non-overloaded ones too
-    o->newline() << "if (unlikely(c->next)) { c->last_error = \"all functions exhausted\"; goto out; }";
+    o->newline()
+      << "if (unlikely(c->next)) { "
+      << "c->last_stmt = " << lex_cast_qstring(*e->tok) << "; "
+      << "c->last_error = \"all functions exhausted\"; goto out; }";
 
   // return result from retvalue slot NB: this must be last, for the
   // enclosing statement-expression ({ ... }) to carry this value.
This page took 0.035619 seconds and 5 git commands to generate.