[clang] [Clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

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

[clang] [libcxx] [libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-19 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 Is it my fault that tests fail with `Error: Process completed > with exit code 255`? No, it's the CI being problematic. I've restarted the failed CI. https://github.com/llvm/llvm-project/pull/144220 ___ cfe-commits mai

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-06-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Oh, also note that by default there will still be diagnostics about all incorrect placements. You'll have to opt-in to silently ignoring incorrect placements via `-Wno-dllexport-explicit-instantiation` (assuming I did things correctly). https://github.com/llvm/llvm-project/p

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-06-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > I too had trouble understanding this change based on the description. Could > > you give a concrete example of how mingw and msvc disagree on where to put > > the attribute, and explain how this pr changes things? ``` template class S {}; extern template class __declspe

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

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

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-06-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: ping @erichkeane @cor3ntin @zmodem https://github.com/llvm/llvm-project/pull/133699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-16 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/144220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-16 Thread Nikolas Klauser via cfe-commits
@@ -124,8 +126,8 @@ void test() { #if _LIBCPP_HAS_EXCEPTIONS // expected-error-re@*:* {{call to deleted constructor of{{.* // expected-error-re@*:* {{call to deleted constructor of{{.* - // expected-error-re@*:* {{call to deleted constructor of{{.* - // expect

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-16 Thread Nikolas Klauser via cfe-commits
@@ -124,8 +126,8 @@ void test() { #if _LIBCPP_HAS_EXCEPTIONS // expected-error-re@*:* {{call to deleted constructor of{{.* // expected-error-re@*:* {{call to deleted constructor of{{.* - // expected-error-re@*:* {{call to deleted constructor of{{.* - // expect

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-16 Thread Nikolas Klauser via cfe-commits
@@ -28,14 +28,15 @@ int main(int, char**) { { MoveOnly mo[] = {MoveOnly{3}}; // expected-error@array:* {{to_array requires copy constructible elements}} -// expected-error-re@array:* (call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/8] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

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

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Nikolas Klauser via cfe-commits
@@ -55,6 +55,7 @@ void test() { // expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must be a specialization of std::expected}} // expected-error-re@*:* .*}}cannot be used prior to '::' because it has no members}} // expecte

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: > Hi, @AaronBallman! I noticed that the libc++ tests are not using the latest > version of my code. How can I run them with the latest version? Thank you! They are being run with the current trunk, but also with older versions of Clang, because libc++ s

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-13 Thread Nikolas Klauser via cfe-commits
@@ -1547,6 +1547,58 @@ ExprResult Sema::ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, return BuildTypeTrait(Kind, KWLoc, ConvertedArgs, RParenLoc); } +bool Sema::BuiltinIsBaseOf(SourceLocation RhsTLoc, QualType LhsT, + QualType RhsT) { + //

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/7] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/6] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/6] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] Docs: ambiguous use of "explicitly" in [[clang::no_specializaiton]] (PR #143839)

2025-06-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > This looks fine. The meaning is clear. (If anything, the C++ standard should > have a better way to talk about "partial or explicit specializations") Given that the whole argument to change this is that it's closer to the standard wording I don't see how the current change

[clang] Docs: ambiguous use of "explicitly" in [[clang::no_specializaiton]] (PR #143839)

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

[clang] Docs: ambiguous use of "explicitly" in [[clang::no_specializaiton]] (PR #143839)

2025-06-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 requested changes to this pull request. This seems incorrect. A specialization is instantiated or an explicit specialization according to https://eel.is/c++draft/temp.spec.general#4, which is definitely _not_ what we mean. https://github.com/llvm/llvm-project/pull

[libunwind] [libunwind] Don't override LINKER_LANGUAGE (PR #143533)

2025-06-12 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 requested changes to this pull request. I don't think this is required, or even works after #143162. https://github.com/llvm/llvm-project/pull/143533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[libunwind] [libunwind] Remove checks for -nostdlib++ (PR #143162)

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

[libunwind] [libunwind] Remove checks for -nostdlib++ (PR #143162)

2025-06-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/143162 >From a5c4dbe693af9b1f2dd6ef45aa803453c5fbfe28 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 6 Jun 2025 17:31:23 +0200 Subject: [PATCH] [libunwind] Remove checks for -nostdlib++ --- libunwind/cm

[libunwind] [libunwind] Remove checks for -nostdlib++ (PR #143162)

2025-06-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/143162 libunwind uses a C linker, so it's never even trying to link against any C++ libraries. This removes the code which tries to drop C++ libraries, which makes the CMake configuration simpler and allows for upg

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-06-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/138293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-06-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 633b22215dd7b4addf5a9e1718a76030dd37f9e9 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-06-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 932b62f3a1f5cc7b69a9f2d0e794c511da0eaa6a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-06-02 Thread Nikolas Klauser via cfe-commits
@@ -3990,6 +3990,13 @@ def LocksExcluded : InheritableAttr { let Documentation = [Undocumented]; } +def ReentrantCapability : InheritableAttr { + let Spellings = [Clang<"reentrant_capability">]; + let Subjects = SubjectList<[Record, TypedefName]>; + let Documentation = [U

[clang] [clang] Add attribute [[clang::builtin]] (PR #78071)

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

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-06-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 68a5c9df4e5dc4599a97ccd24b95708ac0e0a327 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-06-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 29273cf49b2cae51f6eee43970deb547272eb97f Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Gentle ping @AaronBallman @cor3ntin https://github.com/llvm/llvm-project/pull/116709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-27 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > This seems reasonable to me? I'm not a huge fan of how much is being put into > `SemaTemplate.cpp` to support all the builtins though. I'm wondering if we > need to split that up in a follow-up and have a `SemaTemplateBuiltins` for > all of these to live. I can take a look

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-27 Thread Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From e735a57745e840f4a19bdd433e823a851890bcbe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From d19c634bc341b33a15ddf05de556fddd4d1bf168 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-24 Thread Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-24 Thread Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-24 Thread Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-22 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Thanks for working on that. Do you have any benchmarks? I haven't benchmarked extensively, but as stated in the commit message, The instantiation of `std::format` is ~20ms faster. IMO that's a significant enough speedup on its own that it grants adding a builtin. I've jus

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-22 Thread Nikolas Klauser via cfe-commits
@@ -6540,67 +6540,70 @@ ExprResult Sema::ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, return BuildTypeTrait(Kind, KWLoc, ConvertedArgs, RParenLoc); } -static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceInfo *Lhs, -

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/5] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/4] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/3] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
@@ -5406,6 +5408,103 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + SourceLocation Loc = TheCall->getBeginLoc(); + auto Ar

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + auto Loc = TheCall->getBeginLoc(); + auto Args = Mutab

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/2] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
@@ -1611,29 +1611,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, Tok.isOneOf( #define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) tok::kw___##Trait, #include "clang/Basic/TransformTypeTraits.def" - tok::kw___is_abstract, - tok::kw___is_aggregat

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + auto Loc = TheCall->getBeginLoc(); + auto Args = Mutab

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/116709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-19 Thread Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-19 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH] [Clang] Add __builtin_invoke and recognize std::invoke as a

[clang] [llvm] Add unnecessary-virtual-specifier to -Wextra (PR #138741)

2025-05-06 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: This should probably work. To make sure you can make a simple change in the `libcxx/` subdirectory to trigger the libc++ pre-commit CI (which should of course be removed again before actually committing). https://github.com/llvm/llvm-project/pull/138741 __

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 >From 205744331346ec8fbfc5fc5cfea178c3eb446da2 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 2 May 2025 17:24:13 +0200 Subject: [PATCH] [libc++] Upgrade to GCC 15 --- .github/workflows/libcxx-bu

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[libcxx] [libunwind] [llvm] [libc++] Upgrade to GCC 15 (PR #138293)

2025-05-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/138293 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

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

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-05-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: They have to be compatible, but we don't need separate macros anymore for exported classes. https://github.com/llvm/llvm-project/pull/133699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-05-02 Thread Nikolas Klauser via cfe-commits
@@ -6606,7 +6606,10 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { if (ClassExported && !ClassAttr->isInherited() && TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) { -Class->dr

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-05-02 Thread Nikolas Klauser via cfe-commits
@@ -4185,6 +4185,14 @@ def DLLExport : InheritableAttr, TargetSpecificAttr { let Documentation = [DLLExportDocs]; } +def DLLExportOnDecl : InheritableAttr, TargetSpecificAttr { philnik777 wrote: Since we don't represent invalid attribute in the AST curren

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Can't you just run the `llvm-include-order` clang-tidy check instead? > > Does that take `IncludeBlocks` and `IncludeCategories` from `.clang-format` > into account? I don't think so, but it shouldn't be impossible to teach clang-tidy. https://github.com/llvm/llvm-projec

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Can't you just run the `llvm-include-order` clang-tidy check instead? https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-24 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Maybe `-Wkeyword-in-c++` or `-Wc++-keyword` would be a more concise name > > for the group? > > I'm not tied to the name I picked, so either of these is fine by me. GCC > doesn't split this into its own warning group, so we've got some latitude. > > Any strong preference

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-24 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Maybe `-Wkeyword-in-c++` or `-Wc++-keyword` would be a more concise name for the group? https://github.com/llvm/llvm-project/pull/137234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] add `-fimplicit-constexpr` flag (PR #136436)

2025-04-19 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: IMO this kind of flag requires an RFC. This is a non-conforming extension and I don't see any rationale for why we'd want to add it. https://github.com/llvm/llvm-project/pull/136436 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-14 Thread Nikolas Klauser via cfe-commits
@@ -870,7 +873,8 @@ def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">; def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">; def UnknownAttributes : DiagGroup<"unknown-attributes">; -def IgnoredAttributes : DiagGroup<"ignored-attributes">; +def Ignored

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 97d6d6918126493fc8c09d9f3af472d701cb2cf9 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 273d0e6149a8326284ec1e385e83c8728c41ff68 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
@@ -145,8 +160,6 @@ struct __common_reference_sub_bullet1<_Tp, _Up> { philnik777 wrote: I've added one. https://github.com/llvm/llvm-project/pull/121199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-11 Thread Nikolas Klauser via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-11 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/133699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-04-10 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > The summary should not merely link to an issue but describe the problem as > well. Two reasons: > > 1. for folks reading this in git log > > 2. The issue may not totally explain what is going on. > > > I actually did not get it at first b/c the issue talks about _

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-04-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From 613ef41a6e3bfa3a24e45ce7761918639143cf82 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH] [Clang] Add __builtin_invoke and recognize std::invoke as a

[clang] [llvm] Revert "Enable unnecessary-virtual-specifier by default" (PR #134105)

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

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-04-05 Thread Nikolas Klauser via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - philnik777 wrote: Hmm, yeah. I gues

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @DKLoehr @AaronBallman Did you see the revert? https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "Enable unnecessary-virtual-specifier by default" (PR #134105)

2025-04-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: CC @DKLoehr @AaronBallman @zmodem - I'm landing this now, since this halts basically all libc++ development. https://github.com/llvm/llvm-project/pull/134105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] Revert "Enable unnecessary-virtual-specifier by default" (PR #134105)

2025-04-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I think we need some better transition story here. Maybe don't enable the warning by default for time until we've had time to update the libc++ containers? https://github.com/llvm/llvm-project/pull/134105 ___ cfe-commits mailing lis

[clang] [llvm] Revert "Enable unnecessary-virtual-specifier by default" (PR #134105)

2025-04-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/134105 Reverts llvm/llvm-project#133265 This causes the whole libc++ CI to fail, since we're not building against a compiler built from current trunk. >From adbf46d2b5b226452eee71825dd26b4414617f7d Mon Sep 17 00:0

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

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

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-03-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/133699 MinGW and Win32 disagree on where the `__declspec(dllexport)` should be placed. However, there doesn't fundamentally seem to be a problem with putting the annotation in both places. This patch adds a new dia

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-03-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From c52c8f35af6a10411ce94e7551781c38cec01f07 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH] [Clang] Add __builtin_invoke and recognize std::invoke as a

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

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

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-03-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/133587 Fixes #132672 >From 1c0a267544c43235d0004edb9beb127a124abd7a Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 29 Mar 2025 15:21:10 +0100 Subject: [PATCH] [Clang] Make enums trivially equality comp

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-03-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From ddcc9187ffe1aa07988145ab91c0d038aef5800c Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH] [Clang] Add __builtin_invoke and recognize std::invoke as a

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-03-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 19a76935988b306201ed536e99e9094b18006a0f Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-03-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 3010ba7ab5392394b37261807fc7cf4cbb205e0c Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-03-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 3f3478d6708cbea9a68cac31d51e062bbe126ef8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread Nikolas Klauser via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - philnik777 wrote: FWIW we list all

[clang] [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (PR #130570)

2025-03-15 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,120 @@ +// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s +// RUN: %clang_cc1 -std=c++2c -verify=ref,both %s + +// both-no-diagnostics + +namespace std { +inline namespace { philnik777 wrote: I'm just wond

[clang] [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (PR #130570)

2025-03-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,120 @@ +// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s +// RUN: %clang_cc1 -std=c++2c -verify=ref,both %s + +// both-no-diagnostics + +namespace std { +inline namespace { philnik777 wrote: What is this

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-09 Thread Nikolas Klauser via cfe-commits
@@ -1960,13 +1960,103 @@ static bool interp__builtin_memcmp(InterpState &S, CodePtr OpPC, // However, if we read all the available bytes but were instructed to read // even more, diagnose this as a "read of dereferenced one-past-the-end - // pointer". This is what would

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-08 Thread Nikolas Klauser via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : + Template<["int", "long int", "long long int"], + ["_nuw", "l_nuw", "ll_nuw"]>; philnik777 wrote: I'm

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-08 Thread Nikolas Klauser via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : philnik777 wrote: Can we just make these builtins generic instead? There are like a dozen builtin families that first only got

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-08 Thread Nikolas Klauser via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : + Template<["int", "long int", "long long int"], + ["_nuw", "l_nuw", "ll_nuw"]>; + +class SNSWTemplate : + Template<["in

[clang] [clang][bytecode] Yet another __builtin_constant_p implementation (PR #130143)

2025-03-07 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Ah, ok. That's why I couldn't figure it out :D. I'm a bit worried that you could get the constant evaluator in a bad state that way, but I trust you that that's not a problem. Nobody should ever try to modify any state in a `__builtin_constant_p` anyways. https://github.com/

[clang] [clang][bytecode] Yet another __builtin_constant_p implementation (PR #130143)

2025-03-07 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I think this makes sense to me. However, it's entirely unclear to me how you prevent modifications for cases like ```c++ bool test(int& i) { return __builtin_constant_p(i = 5); // How does this fail? } ``` > Okay, this fixes 112 libc++ tests. BTW, this is awesome! The rate

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-03-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/121199 >From 55f9d1e5abf5f217e58988742bd7f375d744beb8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 27 Sep 2024 22:11:14 +0200 Subject: [PATCH] [Clang] Add __builtin_common_reference --- clang/docs/Lan

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

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

  1   2   3   4   5   6   >