[libcxx-commits] [libcxx] [libc++] Disable SSP in `clear_padding.pass.cpp` (PR #218130)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 18 01:54:43 PDT 2026


huixie90 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`. 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. 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.

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


More information about the libcxx-commits mailing list