facebookexperimental / object-introspection

Object Introspection (OI) enables on-demand, hierarchical profiling of objects in arbitrary C/C++ programs with no recompilation.
Apache License 2.0
160 stars 13 forks source link

CodeGen: Remove Incomplete members from Classes #427

Closed ajor closed 9 months ago

ajor commented 9 months ago

They must not appear in the final generated code as we'd end up with invalid types with void members, e.g.:

  struct Foo {
    int a;
    void myIncompleteMember;
    int c;
  };

Removing them from the type graph early also ensures that padding is calculated correctly.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (4fdf44b) 68.75% compared to head (ea8d7dd) 68.73%. Report is 1 commits behind head on main.

Files Patch % Lines
oi/type_graph/RemoveMembers.cpp 66.66% 0 Missing and 1 partial :warning:
test/test_remove_members.cpp 66.66% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #427 +/- ## ========================================== - Coverage 68.75% 68.73% -0.02% ========================================== Files 119 119 Lines 11636 11641 +5 Branches 1917 1920 +3 ========================================== + Hits 8000 8002 +2 - Misses 2663 2664 +1 - Partials 973 975 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.