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

2024-04-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'd rather keep the libc++ tests green while landing this PR. I tried > something out, let's see if that works. It looks like some further adjustments may be needed as some stage1 builders are failing: ``` # .---command stderr # |

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

2024-04-24 Thread Aaron Ballman via cfe-commits
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

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

2024-04-24 Thread via cfe-commits
cor3ntin wrote: For the record, I am fairly opposed to a warning on normal use of a standard function. I'm not very concerned about users using different target flags across TUs because this is already a massive foot gun and I do not buy that we are making things materially worse. Instead,

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

2024-04-24 Thread Aaron Ballman via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing. + virtual unsigned

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

2024-04-24 Thread Aaron Ballman via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing.

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

2024-04-24 Thread Aaron Ballman via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

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

2024-04-23 Thread James Y Knight via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

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

2024-04-23 Thread James Y Knight via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing. + virtual unsigned

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

2024-04-23 Thread James Y Knight via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing.

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

2024-04-23 Thread James Y Knight via cfe-commits
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/89446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread James Y Knight via cfe-commits
https://github.com/jyknight commented: I think having the on-by-default diagnostic before we release this functionality is critically important -- but the primarily-useful part of that is going to be for the public libc++ APIs which expose these values (and, that already landed in mainline).

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

2024-04-23 Thread Aaron Ballman via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

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

2024-04-23 Thread via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

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

2024-04-23 Thread James Y Knight via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

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

2024-04-23 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. I'd rather keep the libc++ tests green while landing this PR. I tried something out, let's see if that works. Otherwise LGTM, thanks for tackling this long-standing item on our TODO list :-) https://github.com/llvm/llvm-project/pull/89446