[PATCH] D128589: [clang-repl] Support destructors of global objects.

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 13:50:21 PDT 2022


Hahnfeld added inline comments.


================
Comment at: clang/test/Interpreter/execute.cpp:22-23
 
+struct D { float f = 1.0; D *m = nullptr; D(){} ~D() { printf("D[f=%f, m=0x%llx]\n", f, reinterpret_cast<unsigned long long>(m)); }} d;
+// CHECK: D[f=1.000000, m=0x0]
+
----------------
I think it would be better to add new test cases instead of extending this ever-growing file. And it might also be a good idea to split off some of the previous additions into separate test cases that exercise specific parts of the interpreter infrastructure (D126781 and D123674).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128589



More information about the cfe-commits mailing list