================
@@ -443,21 +443,44 @@ class reverse_children {
} // namespace
-reverse_children::reverse_children(Stmt *S) {
- if (CallExpr *CE = dyn_cast<CallExpr>(S)) {
- children = CE->getRawSubExprs();
+reverse_children::reverse_children(Stmt *S, ASTContext &Ctx) {
+ switch (S->getStmtClass()) {
+ case Stmt::CallExprClass: {
----------------
Xazax-hun wrote:
I think `dyn_cast` would succeed for `CXXMemberCallExpr` and similar subclasses
because `classof` is implemented like:
```
static bool classof(const Stmt *T) {
return T->getStmtClass() >= firstCallExprConstant &&
T->getStmtClass() <= lastCallExprConstant;
}
```
On the other hand, I'd expect the stmt class to be `CallExprClass` only when it
is not a derived type.
https://github.com/llvm/llvm-project/pull/129234
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits