tbaeder marked an inline comment as done. tbaeder added inline comments.
================ Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:338 + this->emitDestructors(); + this->Ctx->emitDestroy(*Idx, SourceInfo{}); + } ---------------- aaron.ballman wrote: > Should we be setting `Idx = std::nullopt;` after this so that the > `LocalScope` destructor does not also emit a destroy for the same `Idx`? Yeah I think that makes sense, thanks. ================ Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:199-200 +bool ByteCodeStmtGen<Emitter>::visitUnscopedCompoundStmt(const Stmt *S) { + if (isa<NullStmt>(S)) + return true; + ---------------- tbaeder wrote: > aaron.ballman wrote: > > Errr, I'm surprised it isn't UB to call this with anything but a > > `CompoundStmt` given the function name. > Yeah, I'm not too happy about that either. I'll see what I can do. Renamed it to `visitLoopBody` and added a doc comment explaining its purpose. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145545/new/ https://reviews.llvm.org/D145545 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits