[clang] [CIR] Add support for derived class declarations (PR #142823)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 5 06:27:27 PDT 2025


================
@@ -32,3 +38,16 @@ CompleteC cc;
 // CIR:       cir.global external @cc = #cir.zero : !rec_CompleteC
 // LLVM:  @cc = global %class.CompleteC zeroinitializer
 // OGCG:  @cc = global %class.CompleteC zeroinitializer
+
+class Base {
+public:
+  int a;
+};
+
+class Derived : public Base {
+public:
+  int b;
+};
+
+int use(Derived *d) { return d->b; }
----------------
erichkeane wrote:

Ah, hrmph.  Well, file this one away then :) 

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


More information about the cfe-commits mailing list