bolshakov-a wrote:
Ok, thanks! Can you merge it please if you don't think that something should be
done with
https://github.com/llvm/llvm-project/pull/156329#discussion_r2316159657?
https://github.com/llvm/llvm-project/pull/156329
___
cfe-commits m
@@ -84,6 +84,9 @@ C++ Specific Potentially Breaking Changes
static_assert((b.*mp)() == 1); // newly rejected
static_assert((c.*mp)() == 1); // accepted
+- ``VarTemplateSpecializationDecl::getTemplateArgsAsWritten()`` method returns
bolshakov-a wrote:
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/156329
>From 2e0a5fa07d1a52205ee37b98b5f9000522f3a8f0 Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Mon, 1 Sep 2025 12:38:24 +0300
Subject: [PATCH] [clang] Remove written template args from implicit var tpl
spec
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase {
DeclResult CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
SourceLocation TemplateNameLoc,
-c
bolshakov-a wrote:
I always forget about release notes, thanks! However, there isn't "Potential
AST breaking changes" section but there is "AST Dumping Potentially Breaking
Changes" one. But this PR doesn't change AST dumps. Maybe, "C++ Specific
Potentially Breaking Changes"?
https://github.c
bolshakov-a wrote:
@erichkeane, @mizvekov, @shafik
https://github.com/llvm/llvm-project/pull/156329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11662,7 +11662,8 @@ class Sema final : public SemaBase {
DeclResult CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
SourceLocation TemplateNameLoc,
-c
@@ -84,6 +84,9 @@ C++ Specific Potentially Breaking Changes
static_assert((b.*mp)() == 1); // newly rejected
static_assert((c.*mp)() == 1); // accepted
+- ``VarTemplateSpecializationDecl::getTemplateArgsAsWritten()`` method returns
bolshakov-a wrote:
https://github.com/bolshakov-a updated
https://github.com/llvm/llvm-project/pull/156329
>From 69887b3e0a0b3b011d095384422f7319dc2f Mon Sep 17 00:00:00 2001
From: Bolshakov
Date: Mon, 1 Sep 2025 12:38:24 +0300
Subject: [PATCH] [clang] Remove written template args from implicit var tpl
spec
https://github.com/bolshakov-a created
https://github.com/llvm/llvm-project/pull/156329
`VarTemplateSpecializationDecl::getTemplateArgsAsWritten()` function should
return `nullptr` in the case of implicit instantiation, as its
`ClassTemplateSpecializationDecl` counterpart does, and not the arg
bolshakov-a wrote:
Yeah, the not-to-break-ABI consideration is obviously the only reason why they
haven't fix it so far. But this makes dangerous to mix declarations with
different tag kinds despite it is allowed by the standard, and hence MSVC has a
warning on that as @kimgr has noticed. So p
bolshakov-a wrote:
> We don't want bug-for-bug conformance, but we do want to be ABI compatible.
It really looks like an MSVC bug. If its mangling depends on whether the first
(forward-)declaration of a class in a translation unit uses `class` or `struct`
class-key, the TUs cannot be linked to
bolshakov-a wrote:
Ah, sorry. I tested on IWYU and get confused because it transforms a
declaration to the definition later.
https://github.com/llvm/llvm-project/pull/147835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
bolshakov-a wrote:
Seems like `getOriginalDecl()` always returns the full definition for
enumerations (and not an opaque declaration for enums with fixed underlying
type). Is it guaranteed?
https://github.com/llvm/llvm-project/pull/147835
___
cfe-com
https://github.com/bolshakov-a commented:
Looks good, thanks! I didn't review the whole PR, just noticed a couple of
issues.
https://github.com/llvm/llvm-project/pull/155028
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
@@ -878,10 +878,10 @@ static bool
IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
// Treat the enumeration as its underlying type and use the builtin type
// class comparison.
if (T1->getTypeClass() == Type::Enum) {
-T1 = T1->getAs()->
@@ -2883,14 +2883,23 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
/// because the type is a RecordType or because it is the injected-class-name
/// type of a class template or class template partial specialization.
CXXRecordDecl *getAsCXXRecordD
https://github.com/bolshakov-a edited
https://github.com/llvm/llvm-project/pull/155028
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2586,8 +2561,9 @@ bool
CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
}
case Type::InjectedClassName:
-mangleSourceNameWithAbiTags(
-cast(Ty)->getDecl());
+mangleSourceNameWithAbiTags(cast(Ty)
+->getOrig
@@ -2586,8 +2561,9 @@ bool
CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
}
case Type::InjectedClassName:
-mangleSourceNameWithAbiTags(
-cast(Ty)->getDecl());
+mangleSourceNameWithAbiTags(cast(Ty)
+->getOrig
@@ -2586,8 +2561,9 @@ bool
CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
}
case Type::InjectedClassName:
-mangleSourceNameWithAbiTags(
-cast(Ty)->getDecl());
+mangleSourceNameWithAbiTags(cast(Ty)
+->getOrig
@@ -2586,8 +2561,9 @@ bool
CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
}
case Type::InjectedClassName:
-mangleSourceNameWithAbiTags(
-cast(Ty)->getDecl());
+mangleSourceNameWithAbiTags(cast(Ty)
+->getOrig
@@ -2586,8 +2561,9 @@ bool
CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
}
case Type::InjectedClassName:
-mangleSourceNameWithAbiTags(
-cast(Ty)->getDecl());
+mangleSourceNameWithAbiTags(cast(Ty)
+->getOrig
bolshakov-a wrote:
Out of curiosity. The old `getDecl()` methods returned the tag type definition
(if present), whereas the new `getOriginalDecl()` returns just some of
redeclarations (and not necessarily the first one). What is the reason of such
change?
https://github.com/llvm/llvm-project/
bolshakov-a wrote:
@kimgr, what do you think?
https://github.com/llvm/llvm-project/pull/147835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
The assert doesn't hurt us, as I've said. I just asked if it is a "documented
way" of working with the new visitor interface. If it not to be avoided, then
we will probably just proceed with the `TraverseQualifier` manipulation.
https://github.com/llvm/llvm-project/pull/1478
bolshakov-a wrote:
They should be avoided not always but in certain circumstances, so there should
be a new flag field in the visitor class. Not many new code, TBH, but using
`TraverseQualifier` was so tempting...
https://github.com/llvm/llvm-project/pull/147835
___
bolshakov-a wrote:
@kimgr, I've just succeeded in building IWYU against this and getting the tests
green. However, I want to spend some time on self-review, probably writing
additional tests, and so on.
https://github.com/llvm/llvm-project/pull/147835
__
bolshakov-a wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/151277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
I've noticed that this PR changed the tag type kind of the implicit `type_info`
from `class` to `struct`. I don't know if it has any bad consequences, but it
looks inconsistent with the definition of `std::type_info`.
https://github.com/llvm/llvm-project/pull/151277
bolshakov-a wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/150946
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bolshakov-a wrote:
Thanks, it becomes now clearer for me. However, I'm still not succeeded in
making this code really working, because the default version of
`TraverseDecltypeType` doesn't traverse the underlying desugared type:
https://github.com/llvm/llvm-project/blob/be6ccc98f38227db02164f17
bolshakov-a wrote:
@mizvekov, could you clarify please what is the point of traversing the host
type twice? The tests pass if just remove the `if` statement.
https://github.com/llvm/llvm-project/pull/132551
___
cfe-commits mailing list
cfe-commits@lis
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
1 - 100 of 136 matches
Mail list logo