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

2025-07-23 Thread Alexander Kornienko via cfe-commits
alexfh wrote: The reduced test case: https://gcc.godbolt.org/z/KhebWaGsc ``` #include #include namespace testing { template struct Matcher { Matcher(int); Matcher(T); }; template Matcher SafeMatcherCast(M polymorphic_matcher_or_value) { return polymorphic_matcher_or_value; } namespace

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

2025-07-23 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > I'm trying to unwrap this more, so far I got to this point: > https://gcc.godbolt.org/z/q76YxfKzP > > Hopefully I can leave only libc++ includes soon. It turned out to be trickier than I thought, but the test is being automatically reduced. I'll post the result when it's ready

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

2025-07-23 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I'm trying to unwrap this more, so far I got to this point: https://gcc.godbolt.org/z/q76YxfKzP Hopefully I can leave only libc++ includes soon. https://github.com/llvm/llvm-project/pull/116709 ___ cfe-commits mailing list cfe-commits@l

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

2025-07-23 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @alexfh Could you maybe provide a reproducer without a dependency on Google Test? I don't easily have access to that, and it shouldn't be too hard to remove that. It looks to me like it's instantiating the variant constructor with something, but unfortunately the diagnostics

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

2025-06-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > @philnik777 I'm encountering a number of test failures related to libc++'s > clang-tidy module when running the libc++ test suite with the new compiler: > > ``` > # .---command stdout > # | > /home/eric/llvm-project/build/libcxx/libcxx/test-suite-install/include

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

2025-06-29 Thread via cfe-commits
@@ -0,0 +1,240 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s -std=c++23 + +void func() { // expected-note {{'func' declared here}} + __builtin_invoke(); // expected-error {{too few arguments to function call, expected at least 1, have 0}} +} + +void nfunc() noexcept {} + +stru

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

2025-06-29 Thread via cfe-commits
@@ -0,0 +1,240 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s -std=c++23 + +void func() { // expected-note {{'func' declared here}} + __builtin_invoke(); // expected-error {{too few arguments to function call, expected at least 1, have 0}} +} + +void nfunc() noexcept {} + +stru

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

2025-06-29 Thread via cfe-commits
EricWF wrote: @philnik777 I'm encountering a number of test failures related to libc++'s clang-tidy module when running the libc++ test suite with the new compiler: > # .---command stdout # | /home/eric/llvm-project/build/libcxx/libcxx/test-suite-install/include/c++/v1/__type_trait

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

2025-06-29 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed 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_invoke and use it in libc++ (PR #116709)

2025-06-29 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 01/14] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-29 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 01/13] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-29 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 01/13] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-27 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 01/12] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-27 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 01/11] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-27 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 01/11] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-26 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 01/10] [Clang] Add __builtin_invoke and recognize std::invoke

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

2025-06-26 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/9] [Clang] Add __builtin_invoke and recognize std::invoke a

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

2025-06-26 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] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-25 Thread Aaron Ballman via cfe-commits
@@ -2224,6 +2224,99 @@ static bool BuiltinCountZeroBitsGeneric(Sema &S, CallExpr *TheCall) { return false; } +static ExprResult BuiltinInvoke(Sema &S, CallExpr *TheCall) { + SourceLocation Loc = TheCall->getBeginLoc(); + MutableArrayRef Args(TheCall->getArgs(), TheCall->g

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

2025-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from testing nits. 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-commi

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

2025-06-25 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,231 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s -std=c++20 + +void func() { // expected-note {{'func' declared here}} + __builtin_invoke(); // expected-error {{too few arguments to function call, expected at least 1, have 0}} +} + +void nfunc() noexcept {} + +stru

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

2025-06-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited 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_invoke and use it in libc++ (PR #116709)

2025-06-25 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Ping @AaronBallman 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_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] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-13 Thread Aaron Ballman via cfe-commits
@@ -4272,6 +4272,12 @@ def MoveIfNsoexcept : CxxLibBuiltin<"utility"> { let Namespace = "std"; } +def Invoke : Builtin { + let Spellings = ["__builtin_invoke"]; + let Attributes = [CustomTypeChecking, Constexpr]; AaronBallman wrote: We should still add te

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

2025-06-13 Thread Timm Baeder via cfe-commits
@@ -4272,6 +4272,12 @@ def MoveIfNsoexcept : CxxLibBuiltin<"utility"> { let Namespace = "std"; } +def Invoke : Builtin { + let Spellings = ["__builtin_invoke"]; + let Attributes = [CustomTypeChecking, Constexpr]; tbaederr wrote: There are no changes to `E

[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 Shafik Yaghmour 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-12 Thread Shafik Yaghmour 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-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] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited 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_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_invoke and use it in libc++ (PR #116709)

2025-05-28 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. I'm fine with the libc++ part of this patch. I like this new approach a lot more. I think it gives us most of the benefits without raising difficult questions. https://github.com/llvm/llvm-project/pull/116709 __

[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 Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. Precommit CI failures look related to this patch: ``` /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-g6cdk-1/llvm-project/github-pull-requests/build-runtimes/include/c++/v1/__type_traits/invoke.h:123:29: error: variable

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

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

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

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

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

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

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

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

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

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please also update `clang/docs/LanguageExtensions.rst` to document the new builtin, and update `clang/docs/ReleaseNotes.rst` so users know about the new functionality. https://github.com/llvm/llvm-project/pull/116709 __

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

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

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

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

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

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited 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_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread via cfe-commits
@@ -2594,6 +2594,8 @@ class Sema final : public SemaBase { SourceLocation BuiltinLoc, SourceLocation RParenLoc); + ExprResult BuiltinInvoke(CallExpr *TheCall); cor3ntin wrote: This doesn't need to

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

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

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

2025-05-20 Thread 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-20 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on that. Do you have any benchmarks? - Please add an entry in LanguageExensions.rst - Can you add a minimum of tests for static / explicit object member functions, lambdas? - Something like https://compiler-explorer.com/z/s5s9sbzn7 I

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

2025-05-20 Thread via cfe-commits
https://github.com/cor3ntin edited 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_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Erich Keane 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 Erich Keane 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 Erich Keane via cfe-commits
https://github.com/erichkeane edited 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_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm happy as-is. Please give Aaron a chance to poke if he wants to. https://github.com/llvm/llvm-project/pull/116709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[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 Erich Keane 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 Erich Keane 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 Erich Keane 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
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 Erich Keane 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 Erich Keane 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 Erich Keane 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 Erich Keane 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 Erich Keane 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(); eri

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

2025-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Couple of nits, else I'm reasonably ok with this. Interested to hear what @AaronBallman has to say, else I think this is beneficial. https://github.com/llvm/llvm-project/pull/116709 ___ cfe-commits mailing lis

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

2025-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited 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_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) Changes `std::invoke` is currently quite heavy compared to a function call, since it involves quite heavy SFINAE. This can be done significantly more efficient by the compiler, since most calls to `std::invok

[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_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] [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] [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] [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_invoke and use it in libc++ (PR #116709)

2024-12-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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_invoke and use it in libc++ (PR #116709)

2024-12-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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_invoke and use it in libc++ (PR #116709)

2024-12-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited 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