From 59de45f155d78e08f55e5ee5e16c24af40f20e5a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 26 Feb 2010 16:25:45 -0800 Subject: Squash elision warnings on synthetic functions * staptree.h (functiondecl): Add a synthetic flag. * elaborate.cxx (semantic_pass_opt1): Don't warn about synthetic funcs. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Mark the new function as synthetic. (dwarf_cast_expanding_visitor::visit_cast_op): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto. * tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto. * testsuite/semok/thirtyeight.stp: New check with -W and @defined. --- tapsets.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 3c1ea5d2..1ffbcec8 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2512,6 +2512,7 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e) // Synthesize a function. functiondecl *fdecl = new functiondecl; + fdecl->synthetic = true; fdecl->tok = e->tok; embeddedcode *ec = new embeddedcode; ec->tok = e->tok; @@ -2860,6 +2861,7 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) // Synthesize a function. functiondecl *fdecl = new functiondecl; + fdecl->synthetic = true; fdecl->tok = e->tok; fdecl->type = type; fdecl->name = fname; @@ -5950,6 +5952,7 @@ tracepoint_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e) // Synthesize a function to dereference the dwarf fields, // with a pointer parameter that is the base tracepoint variable functiondecl *fdecl = new functiondecl; + fdecl->synthetic = true; fdecl->tok = e->tok; embeddedcode *ec = new embeddedcode; ec->tok = e->tok; -- cgit