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:
> 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:
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:
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:
LGTM, but I don't have the commit access, hence cannot merge your PR. Someone
closely related to the community should take a look.
https://github.com/llvm/llvm-project/pull/97792
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
bolshakov-a wrote:
I'd prefer something simpler like:
```cpp
struct A { int* pi; };
template void TplFn();
int i;
void Fn() {
TplFn();
}
```
with checking of the full mangled name.
https://github.com/llvm/llvm-project/pull/97792
_
@@ -1938,12 +1946,23 @@ void
MicrosoftCXXNameMangler::mangleTemplateArgValue(QualType T,
mangleNumber(V.getLValueOffset().getQuantity());
} else if (!V.hasLValuePath()) {
// FIXME: This can only happen as an extension. Invent a mangling.
-break;
+
bolshakov-a wrote:
Ok, got it. Thanks!
https://github.com/llvm/llvm-project/pull/85837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
@efriedma-quic ping.
https://github.com/llvm/llvm-project/pull/85837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1265,13 +1238,62 @@ class TemplateDiff {
IsNullPtr = true;
return;
case TemplateArgument::Expression:
-// TODO: Sometimes, the desugared template argument Expr differs from
-// the sugared template argument Expr. It may be useful in th
https://github.com/bolshakov-a approved this pull request.
One question about the version of the C++ standard under testing, otherwise
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/93265
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
https://github.com/bolshakov-a edited
https://github.com/llvm/llvm-project/pull/93265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
I don't see any C++26-specific stuff here, only C++20.
https://github.com/llvm/llvm-project/pull/93265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/85837
>From 61abd7b6089ecb87eaf6886e251969d4db87e223 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Tue, 19 Mar 2024 19:05:36 +0300
Subject: [PATCH 1/2] [clang][c++20] Fix code coverage mapping crash with
generali
bolshakov-a wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
Could you please merge both of these?
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
This looks like supporting my words:
https://github.com/llvm/llvm-project/blob/llvmorg-19-init/clang/lib/CodeGen/CodeGenPGO.cpp#L935-L936
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.
bolshakov-a wrote:
@efriedma-quic ping. CC @AaronBallman
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
@efriedma-quic, would it be OK to add "subexpression" visitation with a comment
that I'm not sure that it is actually needed?
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
bolshakov-a wrote:
> But anyway, I think we end up doing the right thing automatically if you
> ignore non-unique OpaqueValueExprs.
The problem is that there is no initializing "common expression" in the AST
besides non-unique `OpaqueValueExpr`, hence some code handling
`ArrayInitLoopExpr` sh
bolshakov-a wrote:
> Please turn off [Keep my email addresses
> private](https://github.com/settings/emails) setting in your account.
Done.
https://github.com/llvm/llvm-project/pull/88910
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/1
>From a025b2a45c2a66595c111262dd43c0890f0d54b6 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Tue, 16 Apr 2024 14:21:40 +0300
Subject: [PATCH 1/2] [Coverage] Handle array decomposition correctly
`ArrayInitLo
bolshakov-a wrote:
I don't see any difference on your example (with `main()` and function
definitions added) with and without my patch neither in the dumped coverage
mapping nor in the output of `llvm-cov show ... --show-branches=count
--show-expansions -show-line-counts-or-regions` command. I
bolshakov-a wrote:
Could you merge it please?
https://github.com/llvm/llvm-project/pull/88910
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
Honestly, I'm not very familiar with code coverage technique, but it seems to
me that only explicitly written code is relevant for that. "Common expression"
is exactly the explicitly written part. "Subexpression" is an implicitly
generated per-element initializer which refer
@@ -2177,7 +2177,8 @@ struct CounterCoverageMappingBuilder
}
void VisitOpaqueValueExpr(const OpaqueValueExpr* OVE) {
-Visit(OVE->getSourceExpr());
+if (const Expr *SE = OVE->getSourceExpr())
bolshakov-a wrote:
Makes sense, thanks! Moreover, I've r
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/88910
Only unique `OpaqueValueExpr`s should be handled in the mapping builder, as
[discussed](https://github.com/llvm/llvm-project/pull/85837#discussion_r1542056451)
in #85837. However, `getCond()` returns non-uni
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/88898
This avoids visiting `co_await` or `co_yield` operand 5 times (it is repeated
under transformed awaiter subexpression, and under `await_ready`,
`await_suspend`, and `await_resume` generated call subexpressio
https://github.com/bolshakov-a edited
https://github.com/llvm/llvm-project/pull/1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/1
`ArrayInitLoopExpr` AST node has two occurences of its as-written initializing
expression in its subexpressions through a non-unique `OpaqueValueExpr`. It
causes double-visiting of the initializing expressio
https://github.com/bolshakov-a edited
https://github.com/llvm/llvm-project/pull/85837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2177,7 +2177,8 @@ struct CounterCoverageMappingBuilder
}
void VisitOpaqueValueExpr(const OpaqueValueExpr* OVE) {
-Visit(OVE->getSourceExpr());
+if (const Expr *SE = OVE->getSourceExpr())
bolshakov-a wrote:
> If I'm following correctly, you end
bolshakov-a wrote:
@erichkeane, @cor3ntin, @Endilll, @efriedma-quic ping.
https://github.com/llvm/llvm-project/pull/85837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2177,7 +2177,8 @@ struct CounterCoverageMappingBuilder
}
void VisitOpaqueValueExpr(const OpaqueValueExpr* OVE) {
-Visit(OVE->getSourceExpr());
+if (const Expr *SE = OVE->getSourceExpr())
bolshakov-a wrote:
Not all `OpaqueValueExpr`s having a s
https://github.com/bolshakov-a edited
https://github.com/llvm/llvm-project/pull/85837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/85837
>From 398ad87c1e9669223def3561f4cdd72af11857c3 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Tue, 19 Mar 2024 19:05:36 +0300
Subject: [PATCH] [clang][c++20] Fix code coverage mapping crash with
generalized
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -mllvm -emptyline-comment-coverage=false
-fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping
-emit-llvm-only -main-file-name templates.cpp %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++20 -mllvm -emptyline-comment-coverage=fal
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/85837
Introduced in #78041, originally reported as #79957 and fixed partially in
#80050.
`OpaqueValueExpr` used with `TemplateArgument::StructuralValue` has no
corresponding source expression.
A test case with s
@@ -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:
> Please do!
#80150. I don't know, maybe, some more actions should be done. I cannot add
"release:backport" label, at least.
https://github.com/llvm/llvm-project/pull/80050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
bolshakov-a wrote:
Thanks! Should I open an issue to backport this to RC?
https://github.com/llvm/llvm-project/pull/80050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
@cor3ntin, @erichkeane, could you merge it please?
https://github.com/llvm/llvm-project/pull/80050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
> what a proper fix would look like
Probably, some more `OpaqueValueExpr` handlers should be rewritten correctly.
https://github.com/llvm/llvm-project/pull/80050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
bolshakov-a wrote:
I think the problem is that the generalized NTTP feature is still raw. It
should not break already working features, namely array reference NTTPs, hence
they are swithed back to the old `TemplateArgument::Declaration`, as they
worked prior to #78041, from the new `Structural
bolshakov-a wrote:
@jeremiahar, thanks for reporting! Added a coverage mapping test case.
https://github.com/llvm/llvm-project/pull/80050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/80050
>From ae4b26cbd22a52a932464dfe5c529b296bbf96dd Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Tue, 30 Jan 2024 21:33:34 +0300
Subject: [PATCH] [clang] Represent array refs as
`TemplateArgument::Declaration`
bolshakov-a wrote:
#80050 opened. Nevertheless, a reproducer for future work would be appreciated.
https://github.com/llvm/llvm-project/pull/78041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
bolshakov-a wrote:
@erichkeane, @cor3ntin
https://github.com/llvm/llvm-project/pull/80050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/80050
This returns (probably temporarily) array-referring NTTP behavior to which was
prior to #78041 because ~~I'm fed up~~ have no time to fix regressions.
>From 0ccf1c9eeec7641dfdca9f8a06499512f98ba6da Mon Sep 1
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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
bolshakov-a wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/79764
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
I'm just waiting for someone who would do it instead of me... I don't have
commit access.
https://github.com/llvm/llvm-project/pull/79764
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/79764
>From b3debeb88fdc3d50f257be56f3e60ae7bf83cc07 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Sun, 28 Jan 2024 21:12:10 +0300
Subject: [PATCH] Fix crashes on 'StructuralValue'
`OpaqueValueExpr` doesn't neces
bolshakov-a wrote:
@zmodem, thanks! Added the fix to #79764.
https://github.com/llvm/llvm-project/pull/78041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/79764
>From 474f86604c35bea7041bcf3e6f8e2103d180902f Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Sun, 28 Jan 2024 21:12:10 +0300
Subject: [PATCH] Fix crashes on 'StructuralValue'
`OpaqueValueExpr` doesn't neces
@@ -40,8 +40,12 @@ static const Expr *ignoreTransparentExprs(const Expr *E) {
switch (E->getStmtClass()) {
case Stmt::OpaqueValueExprClass:
-E = cast(E)->getSourceExpr();
-break;
+if (const clang::Expr *SE = cast(E)->getSourceExpr()) {
+ E = SE;
+ bre
bolshakov-a wrote:
@steakhal, @cor3ntin, @erichkeane
https://github.com/llvm/llvm-project/pull/79764
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/79764
`OpaqueValueExpr` doesn't necessarily contain a source expression.
Particularly, after #78041, it is used to carry the type and the value kind of
a non-type template argument of floating-point type or referr
@@ -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:
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
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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
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:
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
___
cfe-commits mailing list
cfe-commi
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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
bolshakov-a wrote:
Thank you all, especially to @zygoloid for allowing me to steal its thunder!
https://github.com/llvm/llvm-project/pull/78041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
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
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 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 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 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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
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
___
cfe-commits mailing list
cfe-co
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
@@ -628,6 +628,10 @@ static bool
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
return IsStructurallyEquivalent(Context, Arg1.getAsExpr(),
Arg2.getAsExpr());
+ case TemplateArgument::StructuralValue:
+// FIXME: Do
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
https://github.com/bolshakov-a edited
https://github.com/llvm/llvm-project/pull/78041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-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
@@ -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
@@ -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
@@ -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
bolshakov-a wrote:
@cor3ntin, #78041.
https://github.com/llvm/llvm-project/pull/77428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-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 Template
@@ -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
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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
bolshakov-a wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/71077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/71077
>From 4435d1ed5ed4785be7df35c129332359d89f132b Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Thu, 2 Nov 2023 19:20:27 +0300
Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic
Prior to this, a
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/71077
>From e5ad8f5b00a297ef745e1b9341df32b80a7c6b77 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Thu, 2 Nov 2023 19:20:27 +0300
Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic
Prior to this, a
bolshakov-a wrote:
I want just note that it is probably not an improvement from the user's point
of view, just a change of wording.
https://github.com/llvm/llvm-project/pull/71077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/71077
>From ff1b0d96e7beef51a082d59548c49b9c02d79eb0 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Thu, 2 Nov 2023 19:20:27 +0300
Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic
Prior to this, a
@@ -5992,6 +5992,15 @@ static ExprResult BuildConvertedConstantExpression(Sema
&S, Expr *From,
/*InOverloadResolution=*/false,
/*AllowObjCWritebackConversion=*/false,
/*AllowE
bolshakov-a wrote:
> Can you add a release note?
Do you think this small diagnostic wording change is worth noting in relnotes?
> Do we need more tests in other contexts where a converted constant expression
> is used?
Seems like constant expressions converted to references may currently only
1 - 100 of 103 matches
Mail list logo