[clang] [clang] Fix static_cast bypassing access control (PR #132285)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 25 11:09:43 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}}
----------------
shafik wrote:
Normally when we add tests to an existing file and it for a bug report we wrap them into a namespace starting with `GH` for Github e.g `namespace GH121429`
https://github.com/llvm/llvm-project/pull/132285
More information about the cfe-commits
mailing list