Which statements may have null child statements?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Which statements may have null child statements?

Alex Denisov via cfe-dev
Hello,

How do we figure out if a particular statement kind may have null child
statement pointers in a fully constructed AST, to avoid unnecessary
defensive checks? Like, "for(;;) {}" has three null child statements, so
ForStmt may have null children. At the same time, binary operators are
unlikely to have null left-hand sides or right-hand sides... unless I
missed something.

I guess it's better to ask late than never, and sorry for interrupting :)
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev