[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:15:40 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:
Ideally, we should be able to compute the size here; would need to change the way we compute the "outer" type.
Can leave that for a followup, I guess.
https://github.com/llvm/llvm-project/pull/89126
More information about the cfe-commits
mailing list