Clang Format API

I’m trying to extend Clang Format to align the types in a function.

for example:

uint64_t A = 0ULL;

uint8_t B = 0ULL;

B needs 2 spaces after the type for the variable B to be in the same column as A.

and I’m not sure where to begin with Clang’s API.

Here are my questions:

1: Where does Clang store each variables type.

2: What does clang do for typedef’d types? for both custom types (like a struct in C), and for common types that have been defined as another underlying type, like uint64_t (generally) being typedef’d as unsigned long long?

Cuz I need the user visible type name, not the underlying type’s type.

3: where is the pointer alignment stored? especially for the DerivePointerAlignment option in Clang Format?