clang/test/Interpreter/global-dtor.cpp
raw| 1 | // clang-format off |
| 2 | // |
| 3 | // Tests that a global destructor is ran on platforms with gnu exception support. |
| 4 | // |
| 5 | // RUN: cat %s | clang-repl | FileCheck %s |
| 6 | |
| 7 | extern "C" int printf(const char *, ...); |
| 8 | |
| 9 | 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; |
| 10 | // CHECK: D[f=1.000000, m=0x0] |
| 11 | |
| 12 | %quit |