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

2024-02-13 Thread Andrey Ali Khan Bolshakov via lldb-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case

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

2024-01-30 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: #80050 opened. Nevertheless, a reproducer for future work would be appreciated. https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-01-30 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: @eaeltsin, could you try out [that branch](https://github.com/bolshakov-a/llvm-project/tree/avoid_regressions)? https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-01-29 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: @zmodem, thanks! Added the fix to #79764. 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] [clang] [lldb] [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 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-tools-extra] [clang] [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
bolshakov-a wrote: Prior to this PR, arrays in NTTP were represented as `Declaration`s and now as `StructuralValue`s referring to their first element. @steakhal, please note

[Lldb-commits] [clang-tools-extra] [clang] [lldb] [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: The tests are passed. Maybe, someone else could write a test and commit? I'm slightly busy. 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 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-tools-extra] [clang] [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: I suspect the reason is in the array-to-pointer conversion in `StructuralValue` argument. Maybe this will help someone to invent a fix quickly... 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 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] [clang] [lldb] [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
bolshakov-a wrote: Thank you all, especially to @zygoloid for allowing me to steal its thunder! https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [clang] [lldb] [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
bolshakov-a wrote: > Do you need me to merge that for you? Yes, please. I don't have commit access. 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-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] [clang] [clang-tools-extra] [lldb] [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 e2fa0ec1fbb77a521b92f2a17f45879ca01cd304 Mon Sep 17 00:00:00 2001 From: Andrey Ali Khan Bolshakov Date: Sun, 6 Aug 2023 19:38:23 +0300 Subject: [PATCH] [c++20] P1907R1: Support for generalized non-type

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

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

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

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

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

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

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

2024-01-20 Thread Andrey Ali Khan Bolshakov 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] [clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-20 Thread Andrey Ali Khan Bolshakov via lldb-commits
@@ -4833,9 +4833,26 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, E = cast(E)->getSubExpr(); goto recurse; - case Expr::SubstNonTypeTemplateParmExprClass: + case Expr::SubstNonTypeTemplateParmExprClass: { +// Mangle a substituted

[Lldb-commits] [clang] [lldb] [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: Removed.

[Lldb-commits] [clang] [lldb] [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
@@ -25,10 +25,13 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclObjC.h" +#include "clang/AST/Expr.h" #include "clang/AST/NSAPI.h" #include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" #include "clang/Basic/Builtins.h"

[Lldb-commits] [clang] [lldb] [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 updated https://github.com/llvm/llvm-project/pull/78041 >From 459f2c778d42fd5132bf69695537dc5f5a26b160 Mon Sep 17 00:00:00 2001 From: Andrey Ali Khan Bolshakov Date: Sun, 6 Aug 2023 19:38:23 +0300 Subject: [PATCH] [c++20] P1907R1: Support for generalized non-type

[Lldb-commits] [clang] [lldb] [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: Just to clarify: do you insist that `#include` set added in a PR should be minimal for

[Lldb-commits] [clang] [lldb] [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
bolshakov-a wrote: Btw, I have a local branch with a few distinct commits. I could temporarily push it to simplify review process, and then squash them before merging. https://github.com/llvm/llvm-project/pull/78041 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [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
bolshakov-a wrote: > Should we add a couple of PCH tests ? [clang/test/Modules/odr_hash.cpp](https://github.com/llvm/llvm-project/pull/78041/files#diff-b0662120e3a8a2bf3ccd95b9e8943640816b457c00e662ebfdd648632e383314) should cover AST serialization/deserialization. But I could missing

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [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
@@ -628,6 +628,10 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext , return IsStructurallyEquivalent(Context, Arg1.getAsExpr(), Arg2.getAsExpr()); + case TemplateArgument::StructuralValue: +// FIXME: Do we need

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [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 updated https://github.com/llvm/llvm-project/pull/78041 >From b178deb9479e86d2899466c521ebfb28a08d27cb Mon Sep 17 00:00:00 2001 From: Andrey Ali Khan Bolshakov Date: Sun, 6 Aug 2023 19:38:23 +0300 Subject: [PATCH] [c++20] P1907R1: Support for generalized non-type

[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

[Lldb-commits] [clang] [lldb] [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
@@ -25,10 +25,13 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclObjC.h" +#include "clang/AST/Expr.h" #include "clang/AST/NSAPI.h" #include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" #include "clang/Basic/Builtins.h"

[Lldb-commits] [clang] [lldb] [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
@@ -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] [clang-tools-extra] [lldb] [clang] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

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

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [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
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [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
@@ -25,7 +25,7 @@ template struct S {}; // #dr1801-S S V; // #dr1801-S-i // cxx98-14-error@-1 {{non-type template argument does not refer to any declaration}} // cxx98-14-note@#dr1801-S {{template parameter is declared here}} -// since-cxx17-error@#dr1801-S-i {{non-type

[Lldb-commits] [clang-tools-extra] [clang] [lldb] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

2024-01-09 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: Seems like I should ping reviewers more actively... Ok, thanks, I'll probably proceed at the weekend. https://github.com/llvm/llvm-project/pull/77428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [clang] [clang-tools-extra] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

2024-01-09 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: Have I understood correctly that I should open my own PR to proceed working on this? https://github.com/llvm/llvm-project/pull/77428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [clang-tools-extra] [clang] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

2024-01-09 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: @cor3ntin, thank you! Could you please take a look and probably merge #71077? This depends on that PR. https://github.com/llvm/llvm-project/pull/77428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org