[cfe-dev] Statements that end with ;

Yang Chen chenyang at cs.utah.edu
Fri Nov 16 12:59:55 PST 2012


madil90 wrote:
> Hi,
>   I need to identify statements that end with ";". I mean, how does clang
> represent a statement that is executed independently e.g.
>   

You can check all statement classes here:

http://clang.llvm.org/doxygen/classclang_1_1Stmt.html

> int a;    // what type of statement is this?
>   

I assume you define ``a'' as a local variable, then ``int a;'' is a 
DeclStmt.

> a = a + 2;   // or this?
>   

It's a BinaryOperator -

http://clang.llvm.org/doxygen/classclang_1_1BinaryOperator.html

- Yang

> Regards,
> Adil
>
>
>
> --
> View this message in context: http://clang-developers.42468.n3.nabble.com/Statements-that-end-with-tp4028311.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>   




More information about the cfe-dev mailing list