[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 07:00:24 PDT 2024


AaronBallman wrote:

> I don't think this feature warrants deviating from our policy that on-by default warnings should be actionable and have a low false-positive rate, nor the complexity to actually produce the warning.

Specific to this point, what concerns me is that there are uses within header files that are reasonable so long as the project is built for the same target. For example, we have internal header files in Clang and LLVM that could potentially make use of this; those headers are not exposed as part of our library interfaces, but we'd get these warnings and they would be false positives which would encourage us to disable the warning. So it's worth keeping in mind that there are false positives with this as well as true positives and I don't know of a good way to tell them apart aside from cross-TU checking like what is done with sanitizers.

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


More information about the cfe-commits mailing list