[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
@@ -2639,6 +2642,87 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 01/10] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/9] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/8] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/7] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/8] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/8] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
@@ -2639,6 +2642,87 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-25 Thread Shamshura Egor via cfe-commits
@@ -2639,6 +2642,87 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-22 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: @cor3ntin ping 🥺 https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-22 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/7] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-19 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: So, I'm not sure if it's really necessary to add tests for arrays, as array is always an aggregate. However I added simple tests https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-19 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: So, I'm not sure if it's really necessary to add tests for arrays, as array is always an aggregate. However I added simple tests https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-19 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/7] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-14 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > I am mostly afk, I will look at this over the weekend. > maybe @AaronBallman can help ping 🥺 https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-09 Thread Shamshura Egor via cfe-commits
@@ -2595,6 +2596,105 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-09 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/5] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-08 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > I am mostly afk, I will look at this over the weekend. maybe @AaronBallman > can help Ok, thanks! https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-08 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/4] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-07 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-07 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: @cor3ntin Hi!! Can you help me, please? I've got a question about inherited constructors. Why ```Ctor->isInheritingConstructor()``` doesn't recognize inherited constructors? I think you can look on a test with S2 struct. (It should fail I guess) https://github.com/llvm/ll

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-07 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/152488 >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:22:32 + Subject: [PATCH 1/3] merged --- clang/lib/Sema/SemaTypeTraits.cpp | 9 +++

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-07 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura created https://github.com/llvm/llvm-project/pull/152488 This commit is part of [#141911](https://github.com/llvm/llvm-project/issues/141911) >From 5a49d52bf57474c3e2f65058c8fbd1203934524b Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Tue, 5 Aug 2025 11:

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

2025-08-04 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > @egorshamshura FYI Thanks for your help. I could not figure it out quickly on my own, and then life got in the way and I forgot... So I hope to return to implementing some more type traits in the near future. @_@ https://github.com/llvm/llvm-project/pull/151935

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

2025-07-26 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > @egorshamshura This patch has caused a failure in libcxx tests: #150601 > > The failure only happens with a libcxx build without exceptions and RTTI. > > Can you please have a look at it? Yes, I will try to fix it as soon as possible. https://github.com/llvm/llvm-projec

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

2025-07-07 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: @cor3ntin it seems that it is possible to merge 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] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-07-03 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/8] Revert "Revert "[Clang] Added explanation why `is_co

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

2025-06-18 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: @philnik777 Is it my fault that tests fail with ```Error: Process completed with exit code 255```? https://github.com/llvm/llvm-project/pull/144220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

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

2025-06-16 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > Can you update the title/description to reflect the entire change (ie reuse > the title/description of the previous PR)? Otherwise LGTM > > Thanks for fixing the libc++ tests I have changed title and added description. How can I rerun job? https://github.com/llvm/llvm-p

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

2025-06-16 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/7] Revert "Revert "[Clang] Added explanation why `is_co

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

2025-06-16 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura 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-16 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura 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-16 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/6] Revert "Revert "[Clang] Added explanation why `is_co

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

2025-06-16 Thread Shamshura Egor 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 Shamshura Egor 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] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-16 Thread Shamshura Egor 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 Shamshura Egor via cfe-commits
https://github.com/egorshamshura deleted 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 Shamshura Egor 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-15 Thread Shamshura Egor 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 Shamshura Egor via cfe-commits
egorshamshura wrote: > > 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++ supports ol

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

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/5] Revert "Revert "[Clang] Added explanation why `is_co

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

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/4] Revert "Revert "[Clang] Added explanation why `is_co

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

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/3] Revert "Revert "[Clang] Added explanation why `is_co

[clang] [Clang] Added explanation why ```is_trivially_copyable``` evaluated to false. (PR #142341)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why ```is_trivial_copyable``` evaluated to false. (PR #142341)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why ```is trivial copyable``` evaluated to false. (PR #142341)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ 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-14 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: 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! https://github.com/llvm/llvm-project/pull/144220 ___ cfe-commits mailing list c

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

2025-06-14 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura created https://github.com/llvm/llvm-project/pull/144220 Reverts #144127 Fixies https://github.com/llvm/llvm-project/pull/143309#issuecomment-2970012054 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo ExtractTypeTraitFromExpression(const Expr *E) { Trait = StdNameToTypeTrait(Name); if (!Trait) return std::nullopt; -for (const auto &Arg : VD->getTemplateArgs().asArray()) - Args.push_back(Arg.getAsTyp

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -1981,8 +1983,16 @@ static ExtractedTypeTraitInfo ExtractTypeTraitFromExpression(const Expr *E) { Trait = StdNameToTypeTrait(Name); if (!Trait) return std::nullopt; -for (const auto &Arg : VD->getTemplateArgs().asArray()) - Args.push_back(Arg.getAsTyp

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/143309 >From ed1f379144736e0c645dca87b0111f685bdd7e53 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Sun, 8 Jun 2025 13:09:54 + Subject: [PATCH 1/8] Fixed problem when std::is_xxx_v<> tries to get Argume

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -1981,8 +1983,16 @@ static ExtractedTypeTraitInfo ExtractTypeTraitFromExpression(const Expr *E) { Trait = StdNameToTypeTrait(Name); if (!Trait) return std::nullopt; -for (const auto &Arg : VD->getTemplateArgs().asArray()) - Args.push_back(Arg.getAsTyp

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -2253,6 +2260,60 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, } } +static void DiagnoseNonConstructibleReason( +Sema &SemaRef, SourceLocation Loc, +const llvm::SmallVector &Ts) { + bool CompleteTypes = true; + for (const auto &ArgTy : Ts) {

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -2253,6 +2260,53 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, } } +static void DiagnoseNonConstructibleReason( +Sema &SemaRef, SourceLocation Loc, +const llvm::SmallVector &Ts) { + for (const auto &ArgTy : Ts) { +if (ArgTy->isVoidType())

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -2253,6 +2260,53 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, } } +static void DiagnoseNonConstructibleReason( +Sema &SemaRef, SourceLocation Loc, +const llvm::SmallVector &Ts) { + for (const auto &ArgTy : Ts) { egorshamshura

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo ExtractTypeTraitFromExpression(const Expr *E) { Trait = StdNameToTypeTrait(Name); if (!Trait) return std::nullopt; -for (const auto &Arg : VD->getTemplateArgs().asArray()) - Args.push_back(Arg.getAsTyp

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo ExtractTypeTraitFromExpression(const Expr *E) { Trait = StdNameToTypeTrait(Name); if (!Trait) return std::nullopt; -for (const auto &Arg : VD->getTemplateArgs().asArray()) - Args.push_back(Arg.getAsTyp

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/143309 >From ed1f379144736e0c645dca87b0111f685bdd7e53 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Sun, 8 Jun 2025 13:09:54 + Subject: [PATCH 1/7] Fixed problem when std::is_xxx_v<> tries to get Argume

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -2253,6 +2260,60 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, } } +static void DiagnoseNonConstructibleReason( +Sema &SemaRef, SourceLocation Loc, +const llvm::SmallVector &Ts) { + bool CompleteTypes = true; + for (const auto &ArgTy : Ts) {

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Shamshura Egor via cfe-commits
@@ -564,11 +564,12 @@ struct A { namespace ex2 { #if __cplusplus >= 201103L struct Bar { - struct Baz { + struct Baz { // #Baz egorshamshura wrote: Fixed https://github.com/llvm/llvm-project/pull/143309 ___ cfe-co

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-09 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/143309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-09 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/143309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-09 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/143309 >From ed1f379144736e0c645dca87b0111f685bdd7e53 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Sun, 8 Jun 2025 13:09:54 + Subject: [PATCH 1/2] Fixed problem when std::is_xxx_v<> tries to get Argume

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-09 Thread Shamshura Egor via cfe-commits
@@ -2159,6 +2167,26 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, } } +static void DiagnoseNonConstructibleReason(Sema &SemaRef, SourceLocation Loc, + QualType T) { + SemaRef.Diag(Loc, diag::note_unsatisfied_trai

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-08 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/143309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-08 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura created https://github.com/llvm/llvm-project/pull/143309 Also fixed problem with ```ExtractTypeTraitFromExpression```. In case ```std::is_xxx_v<>``` with variadic pack it tries to get template argument, but fails in expression ```Arg.getAsType()``` due to ```Ar

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-06 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > LGTM! Thanks a lot. Will you need us to merge that for you? Yep, that would be great https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-06 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/9] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-03 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/9] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-03 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-03 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,87 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-03 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,87 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-03 Thread Shamshura Egor via cfe-commits
@@ -144,3 +144,54 @@ static_assert(__builtin_is_cpp_trivially_relocatable(U2)); // expected-note@#tr-U2 {{'U2' defined here}} } + +namespace trivially_copyable { +struct B { + virtual ~B(); +}; +struct S : virtual B { // #tc-S +S(); +int & a; +const int ci; +B

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-03 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/8] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -1922,6 +1924,7 @@ static std::optional StdNameToTypeTrait(StringRef Name) { return llvm::StringSwitch>(Name) .Case("is_trivially_relocatable", TypeTrait::UTT_IsCppTriviallyRelocatable) + .Case("is_trivially_copyable", TypeTrait::UTT_IsTriviallyCopy

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -144,3 +144,54 @@ static_assert(__builtin_is_cpp_trivially_relocatable(U2)); // expected-note@#tr-U2 {{'U2' defined here}} } + +namespace trivially_copyable { +struct B { + virtual ~B(); +}; +struct S : virtual B { // #tc-S +S(); +int & a; +const int ci; +B

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -144,3 +144,54 @@ static_assert(__builtin_is_cpp_trivially_relocatable(U2)); // expected-note@#tr-U2 {{'U2' defined here}} } + +namespace trivially_copyable { +struct B { + virtual ~B(); +}; +struct S : virtual B { // #tc-S +S(); +int & a; +const int ci; +B

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,88 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/7] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura deleted https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,88 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,88 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/6] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/5] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/7] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -1922,6 +1924,7 @@ static std::optional StdNameToTypeTrait(StringRef Name) { return llvm::StringSwitch>(Name) .Case("is_trivially_relocatable", TypeTrait::UTT_IsCppTriviallyRelocatable) + .Case("is_trivially_copyable", TypeTrait::UTT_IsTriviallyCopy

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/6] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -1922,6 +1924,7 @@ static std::optional StdNameToTypeTrait(StringRef Name) { return llvm::StringSwitch>(Name) .Case("is_trivially_relocatable", TypeTrait::UTT_IsCppTriviallyRelocatable) + .Case("is_trivially_copyable", TypeTrait::UTT_IsTriviallyCopy

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -1776,6 +1777,8 @@ def note_unsatisfied_trait_reason "%VBase{has a virtual base %1}|" "%NRBase{has a non-trivially-relocatable base %1}|" "%NRField{has a non-trivially-relocatable member %1 of type %2}|" + "%NTCBase{has a non-trivia

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/5] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/3] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,97 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/142341 >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH 1/4] [Clang] Added explanation why a is trivial copyable e

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,97 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,97 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -2083,6 +2086,97 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, + SourceLocat

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura created https://github.com/llvm/llvm-project/pull/142341 None >From 2e423a75e5ee8b5ecc450d4457fc677fd0c08ad2 Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Mon, 2 Jun 2025 07:25:26 + Subject: [PATCH] [Clang] Added explanation why a is trivial copyable