mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-12-22 21:33:07 +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. |
||
---|---|---|
.. | ||
AddChildren.cpp | ||
AddChildren.h | ||
AddPadding.cpp | ||
AddPadding.h | ||
AlignmentCalc.cpp | ||
AlignmentCalc.h | ||
ClangTypeParser.cpp | ||
ClangTypeParser.h | ||
CMakeLists.txt | ||
DrgnExporter.cpp | ||
DrgnExporter.h | ||
DrgnParser.cpp | ||
DrgnParser.h | ||
EnforceCompatibility.cpp | ||
EnforceCompatibility.h | ||
Flattener.cpp | ||
Flattener.h | ||
IdentifyContainers.cpp | ||
IdentifyContainers.h | ||
KeyCapture.cpp | ||
KeyCapture.h | ||
NameGen.cpp | ||
NameGen.h | ||
NodeTracker.h | ||
PassManager.cpp | ||
PassManager.h | ||
Printer.cpp | ||
Printer.h | ||
Prune.cpp | ||
Prune.h | ||
RemoveMembers.cpp | ||
RemoveMembers.h | ||
RemoveTopLevelPointer.cpp | ||
RemoveTopLevelPointer.h | ||
TopoSorter.cpp | ||
TopoSorter.h | ||
TypeGraph.cpp | ||
TypeGraph.h | ||
TypeIdentifier.cpp | ||
TypeIdentifier.h | ||
Types.cpp | ||
Types.h | ||
Visitor.h |