This function provides an easy way to check for a function's varidicity.
gcc/rust/ChangeLog:
* ast/rust-item.h: Add a getter to check if a given function is
variadic.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
void accept_vis (ASTVisitor &vis) override;
+ bool is_variadic () const
+ {
+ return function_params.size () != 0
+ && function_params.back ().is_variadic ();
+ }
+
// Invalid if block is null, so base stripping on that.
void mark_for_strip () override { function_body = nullptr; }
bool is_marked_for_strip () const override