================ @@ -0,0 +1,59 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -std=c++11 -O1 -disable-llvm-passes %s -o - | FileCheck %s + +struct alignas(32) F { int x; }; + +struct S { + char &a; + int &b; + F &c; ---------------- efriedma-quic wrote:
It's maybe worth adding a few more testcases for some edge cases here? For example: ``` struct A { alignas(32) char x[32]; }; struct B : virtual A { long long b; char c; }; extern B& b; extern B (&bb)[2]; void f() { b.c = 0; // align 8 bb[0].c = 0; // align 32 } ``` ------ Maybe also add a testcase where there isn't an immediate load/store (since that where the alignment metadata is most relevant)? https://github.com/llvm/llvm-project/pull/98746 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits