[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Any thoughts on how we should proceed here? https://github.com/llvm/llvm-project/pull/86652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-07 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Ensure "=default"ed function can be deleted when used as an extension in C++03 (PR #90725)

2024-05-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Note that this is also a problem with an implicit assignment operator: https://godbolt.org/z/jrh5novMo. I'm not 100% sure it's not a bug, but it definitely looks to me like one. It's definitely a mismatch between C++03 and C++11, which I wouldn't expect given that `= delete`

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-29 Thread Nikolas Klauser via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: philnik777 wrote: How would that help? https://github.com/llvm/llvm-project/pull/88978

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-28 Thread Nikolas Klauser via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: philnik777 wrote: These have to be made `constexpr`, at least in C++23. C++ stdlibs can't override

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-24 Thread Nikolas Klauser via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: philnik777 wrote: I just wanted to say thanks for working on this. I'd love to enable the vectorization branches in libc++ during constant

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

2024-04-22 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman thanks for picking this up! I agree with @cor3ntin and @ldionne that we should provide the macros unconditionally. This brings us one step closer to finally making libc++ fully conforming in C++17. With the PSTL finally making steady progress, we're probably

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/88528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/88528 >From 0c9372749f4b2d52deddea82be4e77524a66a348 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 12 Apr 2024 17:36:53 +0200 Subject: [PATCH] [Clang] Fix __is_trivially_equaltiy_comparable

[clang] Revert "[Clang] Reduce the size of Decl and classes derived from it" (PR #88654)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/88654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Reduce the size of Decl and classes derived from it" (PR #88654)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/88654 Reverts llvm/llvm-project#87361 On 32 bit platforms there is only a single bit available in the `DeclCtx`, resulting in an assertion failure. >From b243ca1d3616d1dd61b81e3a112707e27cd4c865 Mon Sep 17

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/87361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/88631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/88528 Currently `__is_trivially_equality_comparable` is documented to return true if comparing the value representation is equivalent to calling the comparison operator, which is not quite what the trait actually

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. LGTM from my side. I'll leave the conformance test details to the folks who know what they're doing. https://github.com/llvm/llvm-project/pull/88161 ___ cfe-commits mailing list

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Note that > > ```c++ > > auto div(_Complex float lhs, _Complex float rhs) { > > return lhs / rhs; > > } > > > > int main() { > > return __real div(1.f, 2.f); > > } > > ``` > > > > > > > > > > > > > > > > > > > > > > > > will

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Note that ```c++ auto div(_Complex float lhs, _Complex float rhs) { return lhs / rhs; } int main() { return __real div(1.f, 2.f); } ``` will fail to link on windows due to `__divsc3` not being available. Similar programs probably also fail due to other compiler-rt

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Nikolas Klauser via cfe-commits
@@ -268,17 +268,34 @@ class alignas(8) Decl { /// } /// void A::f(); // SemanticDC == namespace 'A' ///// LexicalDC == global namespace - llvm::PointerUnion DeclCtx; + llvm::PointerIntPair< philnik777 wrote: IDK. I'm personally not

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/2] [Clang] Reduce the size of Decl and classes derived from

[clang] [clang] Reject VLAs in `__is_layout_compatible()` (PR #87737)

2024-04-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I think clang should reject incomplete types when the standard says so. It doesn't seem particularly useful to accept some special cases but reject incomplete types in general. All the traits should probably be audited once. It looks like Clang has other problematic cases:

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/87361 Class | Old size (in bytes) | New size (in bytes) --|-| Decl | 40

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-04-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I'd personally be fine with deprecating it. As I said above, we use it in libc++ for padding inside `string` like ```c++ struct short_string { ; char padding[sizeof(value_type) - 1]; ; }; ``` That could be refactored relatively easily as ```c++ template struct padding_t

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Re: there being observable differences between a header in C vs C++ mode, > that's already a thing. > > The definition for `isinf` in math.h is specified to be a macro in C, but > specified to be a function in C++. We're already doing `#ifdef __cplusplus` > for that (see

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I mean that `stddef.h` would be modified to provide it as a function instead of a macro. In C++ it would simply never be a macro. https://github.com/llvm/llvm-project/pull/86748 ___ cfe-commits mailing list

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > I can see WG21 solving this either by removing `unreachable` from `cstddef` > or by requiring `utility` to guard against the macro via implementation magic > (personally, I think `utility` should guard against it because of users > including `stddef.h` directly) and it

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > `unreachable` is morally similar to `offsetof` in that it's a macro interface > where the implementation can give better results by expanding to a builtin > than a library is likely to be able to give via a naive implementation, but > the interfaces _can_ be provided by a

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Another option would be to to not acknowledge zero-sized arrays in the type traits at all, just like vector types: https://godbolt.org/z/aP685vz8q. That may be the most consistent stance on this. Basically "It's non-standard and doesn't fit neatly in any of the standard

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > I wonder if we should be considering making zero-length arrays into a > non-conforming extension behind a flag? e.g., `-fzero-sized-arrays` and then > it does report true for `__is_array`, `__is_bounded_array`, and handles > template specializations, etc as though it were

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-26 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > This doesn't leave us with good options, does it? :-( Not really. Zero-sized arrays should probably have been supported by C++ all along, but it's too late to change it now. > I think we need to consider the following things: > > * Should `Ty[0]` and `Ty[]` be handled

[libcxx] [libunwind] [DRAFT][libc++] Switch FreeBSD to C++26 (PR #86658)

2024-03-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. LGTM with the libunwind changes removed. https://github.com/llvm/llvm-project/pull/86658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] [libunwind] [DRAFT][libc++] Switch FreeBSD to C++26 (PR #86658)

2024-03-26 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Yes, it would be the only buildkite one (AFAIK). I don't think that would make much of a difference though. https://github.com/llvm/llvm-project/pull/86658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxx] [libunwind] [DRAFT][libc++] Switch FreeBSD to C++26 (PR #86658)

2024-03-26 Thread Nikolas Klauser via cfe-commits
@@ -39,6 +39,9 @@ # if defined(__HAIKU__) # define _LIBUNWIND_TARGET_HAIKU 1 # endif +#if defined(__FreeBSD__) philnik777 wrote: Are these changes related? https://github.com/llvm/llvm-project/pull/86658 ___

[libcxx] [libunwind] [DRAFT][libc++] Switch FreeBSD to C++26 (PR #86658)

2024-03-26 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: The C++26 job is part of the first jobs that get run. Did you just miss it, or do you mean something else? https://github.com/llvm/llvm-project/pull/86658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-26 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > According to the spec it's ill-formed, so I'm not sure it falls under any > > sensible category. > > It's an extension we support so it's up to us to decide what sensible is. Sure. If we end up putting it in the array category we should probably coordinate with GCC. >

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-26 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > My primary question is: then what is it? > > We return true for `__is_aggregrate` (https://godbolt.org/z/67zjeo7Mj), and > an aggregate is an array or class type > (https://eel.is/c++draft/dcl.init.aggr#1). This isn't a class type... but it > is an aggregate... so it must

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/86652 Fixes #54705 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 4d0e485f11fc352ff138268698f776d08c2136b1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-17 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 3caa29d68939fec7fcd11bc699c01a74ab1f7d2a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-17 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 9bd0146b3f058499b82bdb88fe5bd045c3c07caf Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] Reapply "[clang] Fix crash when declaring invalid lambda member" (PR #85427)

2024-03-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/85427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang] Fix crash when declaring invalid lambda member" (PR #85427)

2024-03-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/85427 >From bfc6023d76077217fd4c82a91de6e0c08283ddbc Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 15 Mar 2024 17:28:11 +0100 Subject: [PATCH] Reapply "[clang] Fix crash when declaring invalid lambda

[clang] [llvm] Reapply "[clang] Fix crash when declaring invalid lambda member" (PR #85427)

2024-03-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/85427 This re-applies #74110 with the crashing code disabled in C++03. I'll try to fix the new crash in it's own patch. >From 9deb45f9b175ce41698feb685d74720c2397b63e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser

[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/83721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/84591 >From 634b8e8285b23201d7ad852ae35044d9b89c3c63 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined keywords

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/84591 None >From 479b0dec7feb17beaccbdc029799f2333d979ce4 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From db504f5031b11ff7e28a346db829463fd6883d98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 73135ec6395a6d3a29725e58b30ecb42249695fe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 305599596dd5914747687af23a105d2968546ca1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/74110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/74110 >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100 Subject: [PATCH 1/2] [clang] Fix crash when declaring invalid lambda member

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-07 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/74110 >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100 Subject: [PATCH 1/2] [clang] Fix crash when declaring invalid lambda member

[clang] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-03-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Not right now. I think the first thing to do is moving all the builtins to tablegen before we can make better use of it, which is going to take a while. https://github.com/llvm/llvm-project/pull/68324 ___ cfe-commits mailing list

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-03 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman Thanks for the review. Sorry for responding so late - I've missed your review. The tests aren't actually unrelated to the path. This is the file where I discovered the crash, so I just used it to demonstrate that it's fixed. I'm not sure how to split things,

[clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/83723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Add special-casing for including libc++ in C++03 (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/83723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] users/philnik777/add libcxx03 include strategy (PR #83723)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83723 - [Clang][Driver] Merge the different strategies of how libc++ is included - [Clang][Driver] Add special-casing for including libc++ in C++03 >From 756f80f22744bb0f2bfb81e6c4010054f1279337 Mon Sep 17

[clang] [Clang][Driver] Merge the different strategies of how libc++ is included (PR #83721)

2024-03-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83721 None >From 756f80f22744bb0f2bfb81e6c4010054f1279337 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Mar 2024 20:49:30 +0100 Subject: [PATCH] [Clang][Driver] Merge the different strategies of how

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Hm, yeah. I don't think it's worth complicating the parser for a tiny bit of syntax sugar. I like your idea with a `:` quite a bit. `_ExtVector(bool:4)` would also be an option. I don't have a strong preference either way. I'd like to keep it separate from the name though to

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 - thank you for the patch at #68324 You're welcome! FWIW I'd find a syntax like `_ExtVector` better. The underscore and upper case to make it clear that it's non-standard and the angle bracket syntax since it's kind-of a template. This unfortunately doesn't

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-03-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/83065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-03-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: The CI failure is unrelated. https://github.com/llvm/llvm-project/pull/83065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 84443dfd39a4a1c567a0e301a3d9892955b9a2fe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-29 Thread Nikolas Klauser via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -std=gnu++17 -fsyntax-only -fms-compatibility -verify %s - -void f() { - // GNU-style attributes are prohibited in this position. +// RUN: %clang_cc1 -std=gnu++17 -fsyntax-only -fms-compatibility -verify %s philnik777 wrote:

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 9b0ebc71341dbda73714c6fbd0da4ec7d338f4b7 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH 1/2] [Clang] Fix __has_cpp_attribute and C++11 attributes

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From f97ef5d3efc94585e531339a233cfb3007734d9a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH 1/2] [Clang] Fix __has_cpp_attribute and C++11 attributes

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From f97ef5d3efc94585e531339a233cfb3007734d9a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 497b6639231f9d3141cc3278b3e476edd1d642d2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 27 Feb 2024 14:40:42 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/83065 >From 6a439dd61803e7da91a7791453ca7b9acb90b1b6 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 26 Feb 2024 22:39:05 +0100 Subject: [PATCH] [Clang] Fix __has_cpp_attribute and C++11 attributes with

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83065 The values for `__has_cpp_attribute` don't have to be guarded behind `LangOpts.CPlusPlus` because `__has_cpp_attribute` isn't available if Clang isn't in a C++ mode. Fixes #82995 >From

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-02-15 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Ping (@AaronBallman maybe?) https://github.com/llvm/llvm-project/pull/74110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: This isn't ABI breaking for us currently (at least in a non-benign way). We only use it to optimize `vector` growing currently, and just define it to `is_trivially_copyable` if `__is_trivially_relocatable` isn't available. https://github.com/llvm/llvm-project/pull/77092

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 converted_to_draft https://github.com/llvm/llvm-project/pull/81213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From a6ef9191b3a68e68e7dd225bfb1e802f7542ccd9 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From b0b0072067c650e0eb1f4a556301cbc5b873935d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

[clang] [libcxx] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-02-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. The libc++ changes LGTM. https://github.com/llvm/llvm-project/pull/78898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From 8657d0de76373665c55b774b9cdffe9707288efc Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/81213 >From f2394044b0397cbe3bd15f96f43fbf0e50def206 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r

[clang] [libcxx] [Clang] Add __is_invocable_r and __is_nothrow_invocable_r (PR #81213)

2024-02-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/81213 This patch also uses the new builtins in libc++. >From 6c74eb263dd889858f3f7be328d85fe354f71835 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Sep 2023 04:31:02 +0200 Subject: [PATCH] [Clang]

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/80476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @sdkrystian #80476 https://github.com/llvm/llvm-project/pull/80436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/80476 `__is_nothrow_convertible` has been used by libstdc++ previously as an identifier. >From fb4160b50535fd16951c5261e6c7d91da0cd92b0 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/80436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/80436 >From d210ffcbc1c60c222bd456851372f4835cc12127 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024 15:12:15 +0100 Subject: [PATCH] [Clang][libc++] Implement __is_nothrow_convertible and use

[libcxx] [clang] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
@@ -567,6 +567,7 @@ TYPE_TRAIT_1(__is_unsigned, IsUnsigned, KEYCXX) // Embarcadero Binary Type Traits TYPE_TRAIT_2(__is_same, IsSame, KEYCXX) TYPE_TRAIT_2(__is_convertible, IsConvertible, KEYCXX) +TYPE_TRAIT_2(__is_nothrow_convertible, IsNothrowConvertible, KEYCXX)

[clang] [libcxx] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)

2024-02-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/80436 GCC 13 has implemented this builtin. >From dc3aafe0e3bd2e20121440efd8efa86263bd6b4b Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 Feb 2024 15:12:15 +0100 Subject: [PATCH] [Clang][libc++]

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-02-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: ping https://github.com/llvm/llvm-project/pull/74110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [libcxx] [lld] [llvm] [clang] [flang] [libcxxabi] [openmp] [compiler-rt] [mlir] [lldb] [clang-tools-extra] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-02-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/79978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [flang] [libcxxabi] [lldb] [clang-tools-extra] [openmp] [lld] [libcxx] [mlir] [llvm] [libc] [clang] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-02-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. Thanks! LGTM. https://github.com/llvm/llvm-project/pull/79978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -1526,10 +1526,9 @@ bool CXXRecordDecl::isGenericLambda() const { #ifndef NDEBUG static bool allLookupResultsAreTheSame(const DeclContext::lookup_result ) { - for (auto *D : R) -if (!declaresSameEntity(D, R.front())) - return false; - return true; + return

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -1455,39 +1455,44 @@ More information could be found `here Language Extensions Back-ported to Previous Standards = -==

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -58,16 +58,10 @@ class Class2 : public Class1 { #pragma omp declare reduction(fun1 : long : omp_out += omp_in) initializer // expected-error {{expected '(' after 'initializer'}} #pragma omp declare reduction(fun2 : long : omp_out += omp_in)

[flang] [compiler-rt] [libcxx] [clang-tools-extra] [lld] [libc] [clang] [llvm] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -88,9 +88,9 @@ def add_version_header(tc): { "name": "__cpp_lib_allocate_at_least", "values": { -"c++23": 202106, +# "c++23": 202106, # P0401R6 Providing size feedback in the Allocator interface

[lld] [llvm] [clang-tools-extra] [libcxx] [libc] [flang] [compiler-rt] [clang] [libc++][memory] P2652R2: Disallow Specialization of `allocator_traits` (PR #79978)

2024-01-31 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-01-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: ping https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-26 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; +

[clang] [clang] Merge some delarations which currently have different attributes (PR #79349)

2024-01-24 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/79349 None >From f65bd5f45cf24369a56a4cf4c556c57791d0bf3b Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 11 Oct 2023 13:02:30 +0200 Subject: [PATCH] [clang] Merge some delarations which currently have

  1   2   3   >