[cfe-dev] Iterating through an Expression in the Clang AST
dblaikie at gmail.com
Sun Feb 10 08:52:15 PST 2013
On Feb 10, 2013 8:40 AM, "Robert Ankeney" <rrankene at gmail.com> wrote:
> You can use if (isa<BinaryOperator>(stmt)) and if true, recast it as
Just as a aide note, we usually write that with a single dyn_cast rather
than isa+cast, to use just one check instead of two.
> Have a look at the tutorials at:
> The CIrewriter.cpp example gives numerous examples of using visitors like
VisitBinaryOperator, handy if you use a recursive AST visitor to walk the
>> Date: Sat, 9 Feb 2013 19:48:47 -0800 (PST)
>> From: beni <sonaldanak at gmail.com>
>> To: cfe-dev at cs.uiuc.edu
>> Subject: Re: [cfe-dev] Iterating through an Expression in the Clang
>> Message-ID: <1360468127775-4030391.post at n3.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>> thanks! i used the iterators to iterate through a stmt but how do i check
>> what type the sub statement contains? eg. how do i find out if the sub
>> statement is say, a binary operator?
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev