[cfe-dev] Finding Stmt Kind
Pardis Pashakhanloo via cfe-dev
cfe-dev at lists.llvm.org
Sun Nov 18 10:20:18 PST 2018
Hi all,
Is it possible to get the kind of a Stmt object in clang?
The only solution that I know of is using dyn_cast. However, in this
solution, I have to check for every kind of Stmt, e.g.
if (CompoundStmt *CS = dyn_cast<CompoundStmt>(d))
....
else if (IfStmt *IS = dyn_cast<IfStmt>(d))
....
Is there a better solution or trick?
Thanks,
Pardis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181118/6f6ba2a2/attachment.html>
More information about the cfe-dev
mailing list