diff --git a/taichi/transforms/auto_diff.cpp b/taichi/transforms/auto_diff.cpp index 8424e721f63ff..679132c3fb181 100644 --- a/taichi/transforms/auto_diff.cpp +++ b/taichi/transforms/auto_diff.cpp @@ -635,6 +635,10 @@ class ADTransform : public IRVisitor { // do nothing } + void visit(ReturnStmt *stmt) override { + // do nothing + } + void visit(WhileControlStmt *stmt) override { TI_NOT_IMPLEMENTED }