Identify whether Stmt is member of a ForStmt / WhileStmt

Hi all,

Given an Stmt is it possible to identify if it is member of one (or
multiple) ForStmt / WhileStmt ?

Thanks :slight_smile:


You can use the isa<> operator to check if the pointer to a statement is an instance of a specified class. For example:

if (isa(S)) { }

Take a look at for more info.