clang/test/Interpreter/assignment-with-implicit-ctor.cpp
raw| 1 | // REQUIRES: host-supports-jit |
| 2 | // |
| 3 | // RUN: cat %s | clang-repl | FileCheck %s |
| 4 | // RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s |
| 5 | |
| 6 | struct box { box() = default; box(int *const data) : data{data} {} int *data{}; }; |
| 7 | |
| 8 | box foo() { box ret; ret = new int{}; return ret; } |
| 9 | |
| 10 | extern "C" int printf(const char *, ...); |
| 11 | printf("good"); |
| 12 | // CHECK: good |