summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorJosh Stone <joshua.i.stone@intel.com>2008-05-28 17:11:00 -0700
committerJosh Stone <joshua.i.stone@intel.com>2008-05-28 17:11:00 -0700
commit38fd9c0aede86d99834dcc693370255652230a75 (patch)
treec8b3ba0f1eedf5968782d8358ec044b7ac52bd51 /translate.cxx
parent90c278bdf839fbbb5485a1c306ac400efcced388 (diff)
downloadsystemtap-steved-38fd9c0aede86d99834dcc693370255652230a75.tar.gz
systemtap-steved-38fd9c0aede86d99834dcc693370255652230a75.tar.xz
systemtap-steved-38fd9c0aede86d99834dcc693370255652230a75.zip
Make sure that return statements don't override existing errors.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/translate.cxx b/translate.cxx
index 1782abd1..58fa9182 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -2738,6 +2738,10 @@ c_unparser::visit_return_statement (return_statement* s)
"vs", s->tok);
c_assign ("l->__retvalue", s->value, "return value");
+
+ // make sure we reports errors from computing s->value
+ visit_statement (s, 0, false);
+
o->newline() << "c->last_error = \"\";";
// NB: last_error needs to get reset to NULL in the caller
// probe/function