[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