[clang] [CIR] Add handling for static data members (PR #169134)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 21 16:27:37 PST 2025
================
@@ -0,0 +1,53 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck %s -check-prefix=CIR --input-file=%t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck %s -check-prefix=LLVM --input-file=%t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
+// RUN: FileCheck %s -check-prefix=OGCG --input-file=%t.ll
+
+struct HasDtor {
+ ~HasDtor();
+};
+struct S {
+ static inline HasDtor hd;
+};
----------------
erichkeane wrote:
Would love a test that is:
```
struct Outer {
struct Inner {
static inline HasDtor hd;
};
};
```
As this tests the 2nd `isa`, which your current test does not.
https://github.com/llvm/llvm-project/pull/169134
More information about the cfe-commits
mailing list