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