Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested struct being discarded if parent struct is flagged as partial #78

Merged
merged 1 commit into from
Jul 20, 2024

Commits on Jul 19, 2024

  1. Fix nested struct being discarded if parent struct is flagged as partial

    When clang detects that a certain struct doesn't need a full definition,
    i.e. its size is not required, then the flag CompleteDefinitionRequired
    is set to false.  But in the following case:
    ```
    struct Fts3Table {
      struct Fts3Index {
        int nPrefix;
      } *aIndex;
    };
    
    int fts3PrefixParameter(
      const char *zParam,
      int *pnIndex,
      struct Fts3Index **apIndex
    ){
      int a = sizeof(struct Fts3Index);
      return 0;
    }
    ```
    this results in the nested struct `Fts3Index` not being output as its
    parent struct `Fts3Table` is marked as CompleteDefinitionRequired as
    false.  In such cases we have to force CompleteDefinitionRequired of
    the parent struct as true so that its inner structs can be output.
    
    Signed-off-by: Giuliano Belinassi <[email protected]>
    giulianobelinassi committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    9c98264 View commit details
    Browse the repository at this point in the history