[clang] Use pushFullExprCleanup for deferred destroy (PR #88670)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 10:30:13 PDT 2024


================
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -emit-llvm -fexceptions -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=EH,CHECK %s
+// RUN: %clang_cc1 -emit-llvm -o - %s -triple x86_64-linux-gnu | FileCheck -check-prefixes=NOEH,CHECK %s
+namespace std {
+  typedef decltype(sizeof(int)) size_t;
+
+  // libc++'s implementation
+  template <class _E>
+  class initializer_list
+  {
+    const _E* __begin_;
+    size_t    __size_;
+    initializer_list(const _E* __b, size_t __s);
+  };
+}
+
+class Object {
+public:
+  Object() = default;
+  struct KV;
+  explicit Object(std::initializer_list<KV> Properties);
+};
+
+class Value {
+public:
+  Value(std::initializer_list<Value> Elements);
----------------
efriedma-quic wrote:

The use of initializer_list here doesn't seem necessary; you could remove it to reduce the size of the testcase.

Can we integrate this into an existing test file?

https://github.com/llvm/llvm-project/pull/88670


More information about the cfe-commits mailing list