[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 14:45:53 PDT 2024


================
@@ -0,0 +1,22 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -Wno-missing-declarations -emit-llvm -o - %s | FileCheck %s
+
+struct foo {
+  struct bar {
+    int count;
+    int array[] __attribute__((counted_by(count)));
----------------
efriedma-quic wrote:

The only reason foo is relevant in the first place is that getOuterLexicalRecordContext() skips over bar.

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


More information about the cfe-commits mailing list