[clang] [clang] Fix static_cast bypassing access control (PR #132285)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 06:14:33 PDT 2025


================
@@ -23,3 +22,66 @@ void test(A &a, B &b) {
   const A &&ar10 = static_cast<const A&&>(xvalue<A>());
   const A &&ar11 = static_cast<const A&&>(xvalue<B>());
 }
+
+struct C : private A { // expected-note 4 {{declared private here}}
----------------
offsetof wrote:

Added a namespace.

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


More information about the cfe-commits mailing list