[cfe-users] binary operator
folkert via cfe-users
cfe-users at lists.llvm.org
Tue Jul 12 11:22:28 PDT 2016
Hi,
> > When iterating through the AST I encounter BinaryOperator-s, part of an
> > IfStmt.
> > My question now is: how can I find which operator it is? E.g. ==, >=,
> > etc.
> > I'm using libclang.
>
> You can call BinaryOperator::getOpcode, which will return an Opcode,
> which is a typedef of the BinaryOperatorKind enum.
That is part of the C++ api right? I'm using the one with the clang_
prefixes and I could not find any getOpcode call in there (I checked
Index.h).
Folkert van Heusden
--
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
More information about the cfe-users
mailing list