You can use if (isa<BinaryOperator>(stmt))  and if true, recast it as BinaryOperator.  Have a look at the tutorials at:<br><a href="https://github.com/loarabia/Clang-tutorial">https://github.com/loarabia/Clang-tutorial</a><br>
<br>The CIrewriter.cpp example gives numerous examples of using visitors like VisitBinaryOperator, handy if you use a recursive AST visitor to walk the tree.<br><br>Robert<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Date: Sat, 9 Feb 2013 19:48:47 -0800 (PST)<br>
From: beni <<a href="mailto:sonaldanak@gmail.com">sonaldanak@gmail.com</a>><br>
To: <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
Subject: Re: [cfe-dev] Iterating through an Expression in the Clang<br>
        AST<br>
Message-ID: <<a href="mailto:1360468127775-4030391.post@n3.nabble.com">1360468127775-4030391.post@n3.nabble.com</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
thanks! i used the iterators to iterate through a stmt but how do i check<br>
what type the sub statement contains? eg. how do i find out if the sub<br>
statement is say, a binary operator?<br>
<br></blockquote><div> </div></div>