Hello.
In ASTContext, we have methods such as
QualType getSizeType() const
QualType getPointerDiffType() const
[...]
that query TargetInfo, but there seems to be no method named
QualType getIntPtrType() const
Would it be OK to add it?
Enea.
In this case, would it make sense to add a getUIntPtrType() for uintptr_t
as well ?
– Matthieu
It’s not strictly necessary because of getCorrespondingUnsignedType, but that doesn’t mean we shouldn’t add it. getIntPtrType definitely makes sense to me.
Here is the patch. OK to commit?
Enea.
getIntPtr.patch (1.57 KB)
Please don't duplicate the comment in .cpp file. LGTM with that.
Dmitri