mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 13:14:55 +00:00
db93feb180
Summary: We have a good type representation in the Type Graph of an incomplete type and the underlying type that represents. However, this incomplete type still ends up in the generated code as `void` which loses information. For example, a container that can't contain void may fail to compile because it was initialised with `void` but really its because the type it was supposed to be initialised with (say, `Foo`) had incomplete debug information. This change identifies that a type is incomplete in the output by generating it as an incomplete type `struct Incomplete<struct Foo>`. This allows us to name the type correctly in the TreeBuilder output and filter for incomplete types, as well as getting appropriate compiler errors if it mustn't be incomplete. Test Plan: - CI - Added a unit test to namegen. - Enabled and added an extra pointers_incomplete test. This change is tricky to test because it isn't really user visible. The types still use their `inputName` which is unchanged in any successful output - this change is used so the compiler fails with a more detailed error. |
||
---|---|---|
.. | ||
integration | ||
ci.oid.toml | ||
CMakeLists.txt | ||
integration_entry_doStuff_arg0.oid | ||
integration_entry_doStuff_this.oid | ||
integration_entry_inc_arg0.oid | ||
integration_mttest.cpp | ||
integration_return_incN_arg0.oid | ||
integration_sleepy.cpp | ||
integration.py | ||
main.cpp | ||
mocks.h | ||
mttest.h | ||
test_add_children.cpp | ||
test_add_padding.cpp | ||
test_alignment_calc.cpp | ||
test_codegen.cpp | ||
test_compiler.cpp | ||
test_container_info.cpp | ||
test_drgn_parser.cpp | ||
test_drgn_parser.h | ||
test_enforce_compatibility.cpp | ||
test_flattener.cpp | ||
test_identify_containers.cpp | ||
test_key_capture.cpp | ||
test_name_gen.cpp | ||
test_node_tracker.cpp | ||
test_parser.cpp | ||
test_prune.cpp | ||
test_remove_members.cpp | ||
test_remove_top_level_pointer.cpp | ||
test_topo_sorter.cpp | ||
test_type_identifier.cpp | ||
type_graph_utils.cpp | ||
type_graph_utils.h | ||
TypeGraphParser.cpp | ||
TypeGraphParser.h |