vsk created this revision. vsk added reviewers: bkramer, rsmith. vsk added a subscriber: cfe-commits.
This makes it possible to visit the children of a CallExpr from a ConstStmtVisitor. https://reviews.llvm.org/D25047 Files: include/clang/AST/Expr.h Index: include/clang/AST/Expr.h =================================================================== --- include/clang/AST/Expr.h +++ include/clang/AST/Expr.h @@ -2297,6 +2297,9 @@ return child_range(&SubExprs[0], &SubExprs[0]+NumArgs+getNumPreArgs()+PREARGS_START); } + const_child_range children() const { + return const_child_range(const_cast<CallExpr *>(this)->children()); + } }; /// Extra data stored in some MemberExpr objects.
Index: include/clang/AST/Expr.h =================================================================== --- include/clang/AST/Expr.h +++ include/clang/AST/Expr.h @@ -2297,6 +2297,9 @@ return child_range(&SubExprs[0], &SubExprs[0]+NumArgs+getNumPreArgs()+PREARGS_START); } + const_child_range children() const { + return const_child_range(const_cast<CallExpr *>(this)->children()); + } }; /// Extra data stored in some MemberExpr objects.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits