[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Erich Keane via lldb-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument , else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind, T,

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread Andrey Ali Khan Bolshakov via lldb-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument , else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind, T,

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread via lldb-commits
@@ -8129,29 +8067,133 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument , else Kind = CharacterLiteralKind::Ascii; -E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(), - Kind, T,

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-26 Thread via lldb-commits
bgra8 wrote: Heads up: we've stumbled upon this exact crash (https://github.com/llvm/llvm-project/issues/79575) while testing clang inside google too. https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread Erich Keane via lldb-commits
erichkeane wrote: Fixed in: e3ee3762304aa81e4a240500844bfdd003401b36 I'll submit a request to cherry-pick to the release branch. https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread Erich Keane via lldb-commits
erichkeane wrote: That certainly makes sense to me. Can you submit a patch for review to do so, then we can get it cherry-picked to 18? It would be great if we could save this feature in 18. https://github.com/llvm/llvm-project/pull/78041 ___

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: @erichkeane, @cor3ntin, argument types [here](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaTemplateDeduction.cpp#L3022) occurs to be different with sugar added to one of them. This patch fixes the problem: ``` --- a/clang/lib/AST/TemplateBase.cpp +++

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: Thanks! I'll probably take a look in my spare time. Feel free to revert this. https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread via lldb-commits
bgra8 wrote: @bolshakov-a this is causing a regression in the way partial template specializations work. For the following reproducer the partial template specialization is not used by the compiler when it is expected it should be used: ``` const char kt[] = "dummy"; template class

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-21 Thread Andrey Ali Khan Bolshakov via lldb-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/78041 >From 6cc472d5a1214e847b7f3a5dce28d6bed86121ed Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Sun, 21 Jan 2024 16:19:51 +0300 Subject: [PATCH] [c++20] P1907R1: Support for generalized non-type template

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-19 Thread Aaron Ballman via lldb-commits
@@ -6472,7 +6494,20 @@ void CXXNameMangler::mangleValueInTemplateArg(QualType T, const APValue , Out << "plcvPcad"; Kind = Offset; } else { - if (!V.getLValuePath().empty() || V.isLValueOnePastTheEnd()) { + // Clang 11 and before mangled an array

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-15 Thread Vlad Serebrennikov via lldb-commits
Endilll wrote: > The logic is that this is a pretty big hole in our C++20 support and I don't > think it's reasonable to try a merge after the deadline for 18. WDYT? >From our past experience with release managers, they seem quite generous with >deadlines to merge stuff in, as long as

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-15 Thread via lldb-commits
@@ -80,6 +81,13 @@ class TemplateArgument { /// that was provided for an integral non-type template parameter. Integral, +/// The template argument is a non-type template argument that can't be +/// represented by the special-case Declaration, NullPtr, or

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Andrey Ali Khan Bolshakov via lldb-commits
https://github.com/bolshakov-a edited https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Andrey Ali Khan Bolshakov via lldb-commits
@@ -14,6 +14,11 @@ #include "clang/AST/ODRHash.h" +#include "clang/AST/APValue.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/CharUnits.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclCXX.h" bolshakov-a wrote: Types from all of them are

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Andrey Ali Khan Bolshakov via lldb-commits
@@ -12,6 +12,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" +#include "clang/AST/ODRHash.h" bolshakov-a wrote: `ODRHash` is used inside the newly added code. Btw, what do you mean by "necessary"? I