[PATCH] D137070: [clang][Interp] Support destructors

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 20 17:33:21 PST 2022


shafik added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:30
 /// Scope used to handle temporaries in toplevel variable declarations.
-template <class Emitter> class DeclScope final : public LocalScope<Emitter> {
+template <class Emitter> class DeclScope final : public VariableScope<Emitter> {
 public:
----------------
Why the change from `LocalScope` to `VariableScope`?


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:369
+
+      if (const auto *DtorDecl = RDecl->getDestructor()) {
+        const Function *Dtor = this->Ctx->getFunction(DtorDecl);
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137070/new/

https://reviews.llvm.org/D137070



More information about the cfe-commits mailing list