llvm-project/clang/test/Interpreter/assigment-with-implicit-ctor.cpp
Vassil Vassilev 6c62ad446b
[clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138)
In incremental compilation clang works with multiple `llvm::Module`s.
Our current approach is to create a CodeGenModule entity for every new
module request (via StartModule). However, some of the state such as the
mangle context needs to be preserved to keep the original semantics in
the ever-growing TU.

Fixes: llvm/llvm-project#95581.

cc: @jeaye
2024-08-21 07:22:31 +02:00

14 lines
367 B
C++

// REQUIRES: host-supports-jit
// UNSUPPORTED: system-aix
//
// RUN: cat %s | clang-repl | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s
struct box { box() = default; box(int *const data) : data{data} {} int *data{}; };
box foo() { box ret; ret = new int{}; return ret; }
extern "C" int printf(const char *, ...);
printf("good");
// CHECK: good