bolshakov-a wrote:
When instantiating such an alias:
```cpp
template
using Identity = T;
```
before the patch:
```
TemplateSpecializationType 0x676f0a60 'Identity' sugar alias
|-name: 'Identity' qualified
| `-TypeAliasTemplateDecl 0x676c91d8 Identity
|-TemplateArgument type 'IndirectCla
bolshakov-a wrote:
No, IWYU has some complex logic to figure out which type components the type
alias author intends to provide, and which should be `#include`d at the use
site. Of course, substituted template type arguments are the user
responsibility, not the alias author's one, hence this i
bolshakov-a wrote:
> One possibility here is that if you have the type, then you will have a
> template specialization type for the template alias, and that gives you the
> template arguments used to specialize the alias. Which should answer this
> need.
This can probably go, thank you!
http
bolshakov-a wrote:
> From past conversations with IWYU maintainer, this was desirable, since IWYU
> rolls its own resugarer, which is faulty and difficult to maintain.
I just want to mention that, actually, IWYU doesn't probably need any resugarer
at all. A type template argument as-written is
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
https://lists.llvm.org/
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
https://lists.llvm.org/cgi-bin/mailman/li
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
https://lists.llvm.org/c
@@ -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 tem
@@ -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 Template
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
@@ -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 Integ
@@ -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"
#inc
@@ -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 t
@@ -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
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
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
@@ -628,6 +628,10 @@ static bool
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
return IsStructurallyEquivalent(Context, Arg1.getAsExpr(),
Arg2.getAsExpr());
+ case TemplateArgument::StructuralValue:
+// FIXME: Do
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 something
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-
@@ -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 c
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
@@ -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"
#inc
@@ -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.
https://github.co
@@ -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 parame
@@ -6472,7 +6494,20 @@ void CXXNameMangler::mangleValueInTemplateArg(QualType
T, const APValue &V,
Out << "plcvPcad";
Kind = Offset;
} else {
- if (!V.getLValuePath().empty() || V.isLValueOnePastTheEnd()) {
+ // Clang 11 and before mangled an array su
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
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
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
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
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
argum
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
https://lists.llvm.org/cgi-bin/mailman/listin
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/ll
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/l
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-com
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
+++ b/c
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
https://lists.llvm.org/cgi-bin/mail
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
[here](https://github.com/llvm/llvm-project/pull/78041/files#diff-2f25fdb80b1a63f2e0a5a7c7a7c061b494b430ee8f5759b48022a86
@@ -8129,29 +8067,133 @@
Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg,
else
Kind = CharacterLiteralKind::Ascii;
-E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(),
- Kind,
@@ -8129,29 +8067,133 @@
Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg,
else
Kind = CharacterLiteralKind::Ascii;
-E = new (Context) CharacterLiteral(Arg.getAsIntegral().getZExtValue(),
- Kind,
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
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
https://lists.
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
https://lists.llvm.org/cgi-bin/mailman/listinfo
@@ -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 Template
43 matches
Mail list logo