Consider the following declaration:
const char *const ptr = 0;
With an ordinary TypeLoc, I can get the SourceRange corresponding to the “char *” part of the type by calling getSourceRange(), but I would like to get the SourceRange of the whole qualtype, i.e. “const char *const”. The documentation seems to suggest that this should be possible via the TypeLoc::findExplicitQualifierLoc() function, which “Find[s] a type with the location of an explicit type qualifier.” The implementation casts the TypeLoc to a QualifiedTypeLoc and returns the result. However, the documentation for QualifiedTypeLoc states that “Currently, we intentionally do not provide source location for type qualifiers.”
Does this mean that what I want to do is not possible?
Thanks in advance,