[libcxx-commits] [libcxx] [libc++] Disable SSP in `clear_padding.pass.cpp` (PR #218130)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 20 02:28:35 PDT 2026
philnik777 wrote:
> > IMO we should just drop this file, since libc++ isn't in the business of testing the compiler, but I'm fine with this patch with my comment addressed.
>
> This test arguably is testing the libc++ internal function `std::__clear_padding_if_needed`.
It's not calling `__clear_padding_if_needed` in lots of places though. It's calling `__builtin_clear_padding`.
> However, I agree that its true intent is to have full coverage of the clang builtin `__builtin_clear_padding`. Yes I sort of agree it does not really belong to libc++. However, even though, this builtin has same coverage in with Sema and FileCheck tests, it is still very hard to catch all scenarios via a FileCheck test.
If Clang's testing infrastructure is insufficient that Clang's testing infrastructure should be improved. I'm not really convinced that the Clang maintainers see it the same way though, so I don't think we should work around that through libc++.
And it is extremely easy to come up with a runtime test running on an actual target like this one which can test whatever struct we want to test and easily to validate the behaviour of the builtin is correct. I would it would be nice if in clang one could write a test like this running on an actual target but for the time being, IMO, this test is a good enough compromise to detect issues.
I don't think testing the compiler in libc++ is a compromise. IMO it's simply the wrong place.
https://github.com/llvm/llvm-project/pull/218130
More information about the libcxx-commits
mailing list