Skip to content

Decompose compound types #209

@sdkrystian

Description

@sdkrystian

Consider the following:

struct S { };

S x;
S* y;

which produces the following output:

<namespace name="">
  <struct name="S" id="pOYGF6pLJlICuiGO0Xj0daDb/to=">
    <file path="input.cpp" line="6" class="def"/>
  </struct>
  <variable name="y" id="cND4SpNe0NdSmFwUXrBAZmL6sLo=">
    <file path="input.cpp" line="9" class="def"/>
    <type name="S *"/>
  </variable>
  <variable name="x" id="ujOvtFFNPf6akih2fga4S9j6Y9M=">
    <file path="input.cpp" line="8" class="def"/>
    <type name="S" id="pOYGF6pLJlICuiGO0Xj0daDb/to="/>
  </variable>
</namespace>

It may be desirable to define types (i.e, TypeInfo) in a way that separates cv-qualifiers and (pointer/reference/array/function)ness from the unadorned types (so their IDs can be used to reference the declaration of the type).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureSomething new that it should doMetadataAST or Metadata addition/change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions