I'm trying to get the name of method parameter and variable types, but
the name returned by clang_getTypeSpelling contains part of the type as
used, like "const", "&", etc.
Is there any way to use libClang's API to get just the name of the type,
without any of these additions? I'm currently removing these from the
name manually, but it seems superfluous when Clang already has it.
here's one way which might work.
First, convert the CXType to a QualType with 'GetQualType'.
should provide the unqualified pointee type.
Probably, you also want to ignore implicit casts
The QualType can be converted back to a CXType with 'MakeCXType'
Good point. I missed that you’re using the C interface but it seems like similar functionality is available there:
Though, I couldn’t find functionality to remove the qualifiers.
You have to get somewhat creative for that: In particular:
To get the name of a parameter you want to use clang_getCursorSpelling. To get the name of the type for the tool  that I've built I'm using clang_getCursorType and then a big switch  on the type kind, similar to what Jonathan Müller suggested.
 GitHub - jacob-carlborg/dstep: A tool for converting C and Objective-C headers to D modules