libabigail/tests/data/test-read-write
Dodji Seketeli 6a03c86a28 Initial support for function templates
* src/abg-ir.h (function_decl::set_return_type): New inline
	definition.
	(class template_decl, struct template_decl_hash, class
	template_parameter, struct template_parameter_hash, struct
	dynamic_template_parameter_hash, struct
	template_parameter_shared_ptr_hash, class template_type_parameter)
	(struct template_type_parameter_hash, class
	template_non_type_parameter, struct
	template_non_type_parameter_hash, class
	template_template_parameter, struct
	template_template_parameter_hash, class function_template_decl)
	(struct function_template_decl_hash, struct
	fn_tmpl_shared_ptr_hash): New declarations.
	* src/abg-ir.cc (dynamic_type_hash::operator()): Add hashing for
	template template, and template type parameters.
	(template_decl_hash::operator, template_decl::~template_decl)
	(template_decl::operator==, template_parameter::operator==)
	(template_parameter_hash::operator())
	(dynamic_template_parameter_hash::operator())
	(template_type_parameter::operator==)
	(template_type_parameter::~template_type_parameter)
	(template_type_parameter_hash::operator())
	(template_non_type_parameter::operator==)
	(template_non_type_parameter::~template_non_type_parameter)
	(template_non_type_parameter_hash::operator())
	(template_template_parameter::operator==)
	(template_template_parameter::~template_template_parameter)
	(template_template_parameter_hash::operator())
	(function_template_decl::operator==)
	(function_template_decl_hash::operator())
	(fn_tmpl_shared_ptr_hash::operator())
	(function_template_decl::~function_template_decl()): New
	definitions.
	* src/abg-reader.cc (read_context::get_fn_tmpl_decl)
	(read_context::key_fn_tmpl_decl): New functions.
	(read_context::m_fn_tmpl_map): New data member.
	(read_context::key_type_decl): Renamed read_context::add_type_decl
	into this.
	(read_context::push_decl_to_current_scope): Renamed
	read_context::finish_decl_creation into this.  Add an assert.
	(read_context::push_and_key_type_decl): Renamed
	read_context::finish_type_decl_creation into this.  Adjust to the
	use of push_decl_to_current_scope and key_type_decl.
	(build_function_template_decl, build_template_type_parameter)
	(build_template_non_type_parameter)
	(build_template_template_parameter, build_template_parameter)
	(handle_function_template_decl): New functions.
	(handle_element): Call handle_function_template_decl.
	(build_function_decl): Take a bool parameter to update depth
	information in parsing context.  Move instantiation of
	function_decl before parsing its xml sub-nodes.  Update the depth
	info in the parsing context if necessary.  Push the newly
	intantiated decl to scope.  And then parse the sub nodes.  Do not
	forget to add the fn parameters and return type using
	function_decl::add_parameter and function_decl::set_return_type.
	(build_var_decl, build_type_decl, build_qualified_type_decl)
	(build_pointer_type_def, build_reference_type_def)
	(build_enum_type_decl, build_typedef_decl, handled_type_decl)
	(handle_qualified_type_decl, handle_pointer_type_def)
	(handle_reference_type_def, handle_enum_type_decl)
	(handle_typedef_decl, handle_var_decl, handle_function_decl)
	(handle_class_decl): Adjust.
	(build_class_decl): Take a bool parameter to update depth
	information in parsing context. Add comment.  Wait for the class
	members to be built, before keying (and thus hashing it) the
	class.
	(build_type): Fix logic, and adjust.
	* src/abg-writer.cc (write_context::type_has_existing_id)
	(write_context::get_id_for_fn_tmpl, write_template_type_parameter)
	(write_template_non_type_parameter)
	(write_template_template_parameter, write_template_parameter)
	(write_function_template_decl): New functions.
	(write_context::get_id_for_type): Simplify logic.
	(write_decl): Support writing function template.
	* tests/data/test-read-write/test11.xml: New test input.
	* tests/test-read-write.cc (InoutSpec in_out_specs[]):
	De-serialize the new test11.xml test, serialize it back and diff
	output and input.
	* tests/Makefile.am: Add test11.xml to the distribution.
2013-07-23 23:13:50 +02:00
..
test0.xml Support qualified types & Misc ancillary fixes 2013-03-27 23:59:16 +01:00
test1.xml Support qualified types & Misc ancillary fixes 2013-03-27 23:59:16 +01:00
test2.xml Support qualified types & Misc ancillary fixes 2013-03-27 23:59:16 +01:00
test3.xml Support qualified types & Misc ancillary fixes 2013-03-27 23:59:16 +01:00
test4.xml Support pointer types & Fix IR types equality 2013-03-28 15:42:12 +01:00
test5.xml Support reference types 2013-03-29 16:44:08 +01:00
test6.xml Update enum decl representation as per the schema 2013-07-23 23:13:49 +02:00
test7.xml Support typedef declarations 2013-03-30 21:59:19 +01:00
test8.xml Support var decl & mangled_name attributes 2013-04-02 16:51:59 +02:00
test9.xml Add tests/data/test-read-write/test9.xml 2013-07-23 23:13:49 +02:00
test10.xml Initial Support for class declarations 2013-07-23 23:13:49 +02:00
test11.xml Initial support for function templates 2013-07-23 23:13:50 +02:00