[cfe-users] binary operator
Csaba Raduly via cfe-users
cfe-users at lists.llvm.org
Wed Jul 13 00:43:58 PDT 2016
On Wed, Jul 13, 2016 at 9:30 AM, folkert <folkert at vanheusden.com> wrote:
>> > 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.
>
> This c++ version, is this from libtooling? Or which library?
The C++ clang library (libclang?)
http://clang.llvm.org/doxygen/classclang_1_1BinaryOperator.html
I thought you had an instance of this class.
Csaba
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
More information about the cfe-users
mailing list