Const qualifiers on reference types

I’m having a hard time recovering the const qualifier for a function that returns a const & QualType. QualType::isConstQualified and QualType::isLocalConstQualified are returning false and getLocalCVRQualifiers , getCVRQualifiers are returning 0. getNameAsString is returning const on the name. There is a different way to recover the constness when the object is a reference?


A reference can't be const. Call getPointeeType to find the type that
the reference refers to, and apply isConstQualified to that.

Right, sorry. Had somewhere in my mind that getPointeeType returned a Type* instead a QualType.