Let me give you an example to explain what I would like to do (or at least know if this is something that's possible to do) :
In Clang, let's take some basic ValueDecl. As you can see on the provided link, this ValueDecl
can either :
- Be a simple
ValueDecl
- Be a DeclaratorDecl
- Be an EnumConstantDecl
- Be an IndirectFieldDecl
- Be an UnresolvedValueDecl
I would like to know if, given a ValueDecl *
, I can determine whether it's one of the above listed class, or am I bounded to this ValueDecl *
?
In every class, there is this bool classof() method, but I don't understand the purpose of this method. Could it be a solution to my problem ?