I'm working on a custom checker for the clang static analyzer that checks for incorrect use of CPython APIs. I've made some progress, but I'm stuck: how can I get a clang::QualType
value given the name of a type?
For example, I'd like to write something like this:
QualType ty = findTheTypeNamed("Py_ssize_t");
I've spent time looking at the code for clang::ASTContext
and clang::QualType
, but I'm lost.
How can I get a clang::QualType
from the name of a type?