bool
get_member_function_is_virtual(const shared_ptr<function_decl>);
+bool
+get_member_function_is_virtual(const function_decl*);
+
void
set_member_function_is_virtual(const function_decl&, bool);
get_member_function_is_virtual(const function_decl_sptr mem_fn)
{return mem_fn ? get_member_function_is_virtual(*mem_fn) : false;}
+/// Test if a given member function is virtual.
+///
+/// @param mem_fn the member function to consider.
+///
+/// @return true iff a @p mem_fn is virtual.
+bool
+get_member_function_is_virtual(const function_decl* mem_fn)
+{return mem_fn ? get_member_function_is_virtual(*mem_fn) : false;}
+
/// Set the virtual-ness of a member function.
///
/// @param f the member function to consider.
dynamic_cast<const class_decl::method_decl*>(this);
string result = mem_fn ? "method ": "function ";
+
+ if (get_member_function_is_virtual(mem_fn))
+ result += "virtual ";
+
decl_base_sptr type =
mem_fn
? get_type_declaration(mem_fn->get_type()->get_return_type())
in unqualified underlying type 'class s0':
size changed from 192 to 256 bits
1 member function insertion:
- 'method int s0::foo(int, char) const', virtual at voffset 2/2
+ 'method virtual int s0::foo(int, char) const', virtual at voffset 2/2_ZNK2s03fooEic}
1 data member deletion:
'char s0::m1', at offset 96 (in bits)