<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/AST/ASTConcept.cpp, branch users/fmayer/spr/wip-smartpointers</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Clang] Avoid building unnecessary expressions when checking satisfaction (#164611)</title>
<updated>2025-10-22T16:11:56+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-10-22T16:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=72616c5ca99bcf4d93d423642387016cb88409bb'/>
<id>72616c5ca99bcf4d93d423642387016cb88409bb</id>
<content type='text'>
When establishing constraint satisfaction, we were building expressions
even for compound constraint,

This is unnecessary extra work that accounts for ~20% of the performance
regression observed here
https://github.com/llvm/llvm-project/pull/161671#issuecomment-3420976661</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When establishing constraint satisfaction, we were building expressions
even for compound constraint,

This is unnecessary extra work that accounts for ~20% of the performance
regression observed here
https://github.com/llvm/llvm-project/pull/161671#issuecomment-3420976661</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang][NFC] Concepts normalization cleanups (#164229)</title>
<updated>2025-10-20T11:15:47+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-10-20T11:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed9c75aaac9d30fd928ec0b01b447fc1f8890098'/>
<id>ed9c75aaac9d30fd928ec0b01b447fc1f8890098</id>
<content type='text'>
- typos
- use insert instead of back inserter to make allocations more efficient
- make sure the constraint cache uses canonicalized keys to avoid
redundant work</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- typos
- use insert instead of back inserter to make allocations more efficient
- make sure the constraint cache uses canonicalized keys to avoid
redundant work</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Normalize constraints before checking for satisfaction (#161671)</title>
<updated>2025-10-03T07:29:23+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-10-03T07:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e9972debc98ce5d00db47409248bbcf06fafaf73'/>
<id>e9972debc98ce5d00db47409248bbcf06fafaf73</id>
<content type='text'>
In the standard, constraint satisfaction checking is done on the
normalized form of a constraint.

Clang instead substitutes on the non-normalized form, which causes us to
report substitution failures in template arguments or concept ids, which
is non-conforming but unavoidable without a parameter mapping

This patch normalizes before satisfaction checking. However, we preserve
concept-id nodes in the normalized form, solely for diagnostics
purposes.

This addresses https://github.com/llvm/llvm-project/issues/61811 and
related concepts conformance bugs, ideally to make the remaining
implementation of concept template parameters easier

Fixes https://github.com/llvm/llvm-project/issues/135190
Fixes https://github.com/llvm/llvm-project/issues/61811

Co-authored-by: Younan Zhang
[zyn7109@gmail.com](mailto:zyn7109@gmail.com)

---------

Co-authored-by: Younan Zhang &lt;zyn7109@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the standard, constraint satisfaction checking is done on the
normalized form of a constraint.

Clang instead substitutes on the non-normalized form, which causes us to
report substitution failures in template arguments or concept ids, which
is non-conforming but unavoidable without a parameter mapping

This patch normalizes before satisfaction checking. However, we preserve
concept-id nodes in the normalized form, solely for diagnostics
purposes.

This addresses https://github.com/llvm/llvm-project/issues/61811 and
related concepts conformance bugs, ideally to make the remaining
implementation of concept template parameters easier

Fixes https://github.com/llvm/llvm-project/issues/135190
Fixes https://github.com/llvm/llvm-project/issues/61811

Co-authored-by: Younan Zhang
[zyn7109@gmail.com](mailto:zyn7109@gmail.com)

---------

Co-authored-by: Younan Zhang &lt;zyn7109@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Clang] Normalize constraints before checking for satisfaction" (#161669)</title>
<updated>2025-10-02T13:58:55+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-10-02T13:58:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=047f8c8ee08e6efc51c552b910a6fbec2baca189'/>
<id>047f8c8ee08e6efc51c552b910a6fbec2baca189</id>
<content type='text'>
Reverts llvm/llvm-project#141776

CI failures

https://lab.llvm.org/buildbot/#/builders/202/builds/3591 
https://lab.llvm.org/buildbot/#/builders/55/builds/18066
https://lab.llvm.org/buildbot/#/builders/85/builds/14103</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#141776

CI failures

https://lab.llvm.org/buildbot/#/builders/202/builds/3591 
https://lab.llvm.org/buildbot/#/builders/55/builds/18066
https://lab.llvm.org/buildbot/#/builders/85/builds/14103</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Normalize constraints before checking for satisfaction (#141776)</title>
<updated>2025-10-02T12:35:38+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-10-02T12:35:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9583b399d85cacdfa0a41f798ab44abaa3981bbf'/>
<id>9583b399d85cacdfa0a41f798ab44abaa3981bbf</id>
<content type='text'>
In the standard, constraint satisfaction checking is done on the
normalized form of a constraint.

Clang instead substitutes on the non-normalized form, which causes us to
report substitution failures in template arguments or concept ids, which
is non-conforming but unavoidable without a parameter mapping

This patch normalizes before satisfaction checking. However, we preserve
concept-id nodes in the normalized form, solely for diagnostics
purposes.

This addresses #61811 and related concepts conformance bugs, ideally to
make the remaining implementation of concept template parameters easier

Fixes #135190
Fixes  #61811

Co-authored-by: Younan Zhang &lt;zyn7109@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the standard, constraint satisfaction checking is done on the
normalized form of a constraint.

Clang instead substitutes on the non-normalized form, which causes us to
report substitution failures in template arguments or concept ids, which
is non-conforming but unavoidable without a parameter mapping

This patch normalizes before satisfaction checking. However, we preserve
concept-id nodes in the normalized form, solely for diagnostics
purposes.

This addresses #61811 and related concepts conformance bugs, ideally to
make the remaining implementation of concept template parameters easier

Fixes #135190
Fixes  #61811

Co-authored-by: Younan Zhang &lt;zyn7109@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Improve nested name specifier AST representation (#147835)</title>
<updated>2025-08-09T08:06:53+00:00</updated>
<author>
<name>Matheus Izvekov</name>
<email>mizvekov@gmail.com</email>
</author>
<published>2025-08-09T08:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=91cdd35008e9ab32dffb7e401cdd7313b3461892'/>
<id>91cdd35008e9ab32dffb7e401cdd7313b3461892</id>
<content type='text'>
This is a major change on how we represent nested name qualifications in
the AST.

* The nested name specifier itself and how it's stored is changed. The
prefixes for types are handled within the type hierarchy, which makes
canonicalization for them super cheap, no memory allocation required.
Also translating a type into nested name specifier form becomes a no-op.
An identifier is stored as a DependentNameType. The nested name
specifier gains a lightweight handle class, to be used instead of
passing around pointers, which is similar to what is implemented for
TemplateName. There is still one free bit available, and this handle can
be used within a PointerUnion and PointerIntPair, which should keep
bit-packing aficionados happy.
* The ElaboratedType node is removed, all type nodes in which it could
previously apply to can now store the elaborated keyword and name
qualifier, tail allocating when present.
* TagTypes can now point to the exact declaration found when producing
these, as opposed to the previous situation of there only existing one
TagType per entity. This increases the amount of type sugar retained,
and can have several applications, for example in tracking module
ownership, and other tools which care about source file origins, such as
IWYU. These TagTypes are lazily allocated, in order to limit the
increase in AST size.

This patch offers a great performance benefit.

It greatly improves compilation time for
[stdexec](https://github.com/NVIDIA/stdexec). For one datapoint, for
`test_on2.cpp` in that project, which is the slowest compiling test,
this patch improves `-c` compilation time by about 7.2%, with the
`-fsyntax-only` improvement being at ~12%.

This has great results on compile-time-tracker as well:

![image](https://github.com/user-attachments/assets/700dce98-2cab-4aa8-97d1-b038c0bee831)

This patch also further enables other optimziations in the future, and
will reduce the performance impact of template specialization resugaring
when that lands.

It has some other miscelaneous drive-by fixes.

About the review: Yes the patch is huge, sorry about that. Part of the
reason is that I started by the nested name specifier part, before the
ElaboratedType part, but that had a huge performance downside, as
ElaboratedType is a big performance hog. I didn't have the steam to go
back and change the patch after the fact.

There is also a lot of internal API changes, and it made sense to remove
ElaboratedType in one go, versus removing it from one type at a time, as
that would present much more churn to the users. Also, the nested name
specifier having a different API avoids missing changes related to how
prefixes work now, which could make existing code compile but not work.

How to review: The important changes are all in
`clang/include/clang/AST` and `clang/lib/AST`, with also important
changes in `clang/lib/Sema/TreeTransform.h`.

The rest and bulk of the changes are mostly consequences of the changes
in API.

PS: TagType::getDecl is renamed to `getOriginalDecl` in this patch, just
for easier to rebasing. I plan to rename it back after this lands.

Fixes #136624
Fixes https://github.com/llvm/llvm-project/issues/43179
Fixes https://github.com/llvm/llvm-project/issues/68670
Fixes https://github.com/llvm/llvm-project/issues/92757</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a major change on how we represent nested name qualifications in
the AST.

* The nested name specifier itself and how it's stored is changed. The
prefixes for types are handled within the type hierarchy, which makes
canonicalization for them super cheap, no memory allocation required.
Also translating a type into nested name specifier form becomes a no-op.
An identifier is stored as a DependentNameType. The nested name
specifier gains a lightweight handle class, to be used instead of
passing around pointers, which is similar to what is implemented for
TemplateName. There is still one free bit available, and this handle can
be used within a PointerUnion and PointerIntPair, which should keep
bit-packing aficionados happy.
* The ElaboratedType node is removed, all type nodes in which it could
previously apply to can now store the elaborated keyword and name
qualifier, tail allocating when present.
* TagTypes can now point to the exact declaration found when producing
these, as opposed to the previous situation of there only existing one
TagType per entity. This increases the amount of type sugar retained,
and can have several applications, for example in tracking module
ownership, and other tools which care about source file origins, such as
IWYU. These TagTypes are lazily allocated, in order to limit the
increase in AST size.

This patch offers a great performance benefit.

It greatly improves compilation time for
[stdexec](https://github.com/NVIDIA/stdexec). For one datapoint, for
`test_on2.cpp` in that project, which is the slowest compiling test,
this patch improves `-c` compilation time by about 7.2%, with the
`-fsyntax-only` improvement being at ~12%.

This has great results on compile-time-tracker as well:

![image](https://github.com/user-attachments/assets/700dce98-2cab-4aa8-97d1-b038c0bee831)

This patch also further enables other optimziations in the future, and
will reduce the performance impact of template specialization resugaring
when that lands.

It has some other miscelaneous drive-by fixes.

About the review: Yes the patch is huge, sorry about that. Part of the
reason is that I started by the nested name specifier part, before the
ElaboratedType part, but that had a huge performance downside, as
ElaboratedType is a big performance hog. I didn't have the steam to go
back and change the patch after the fact.

There is also a lot of internal API changes, and it made sense to remove
ElaboratedType in one go, versus removing it from one type at a time, as
that would present much more churn to the users. Also, the nested name
specifier having a different API avoids missing changes related to how
prefixes work now, which could make existing code compile but not work.

How to review: The important changes are all in
`clang/include/clang/AST` and `clang/lib/AST`, with also important
changes in `clang/lib/Sema/TreeTransform.h`.

The rest and bulk of the changes are mostly consequences of the changes
in API.

PS: TagType::getDecl is renamed to `getOriginalDecl` in this patch, just
for easier to rebasing. I plan to rename it back after this lands.

Fixes #136624
Fixes https://github.com/llvm/llvm-project/issues/43179
Fixes https://github.com/llvm/llvm-project/issues/68670
Fixes https://github.com/llvm/llvm-project/issues/92757</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Initial support for P2841 (Variable template and concept template parameters) (#150823)</title>
<updated>2025-08-04T06:51:22+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-08-04T06:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28ed57eda80dc5e3b7dd01d15100c126fa4e50f6'/>
<id>28ed57eda80dc5e3b7dd01d15100c126fa4e50f6</id>
<content type='text'>
This is a first pass at implementing
[P2841R7](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2841r7.pdf).

The implementation is far from complete; however, I'm aiming to do that
in chunks, to make our lives easier.

In particular, this does not implement
 - Subsumption
 - Mangling
- Satisfaction checking is minimal as we should focus on #141776 first
(note that I'm currently very stuck)

FTM, release notes, status page, etc, will be updated once the feature
is more mature. Given the state of the feature, it is not yet allowed in
older language modes.

Of note: 
- Mismatches between template template arguments and template template
parameters are a bit wonky. This is addressed by #130603
- We use `UnresolvedLookupExpr` to model template-id. While this is
pre-existing, I have been wondering if we want to introduce a different
OverloadExpr subclass for that. I did not make the change in this patch.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a first pass at implementing
[P2841R7](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2841r7.pdf).

The implementation is far from complete; however, I'm aiming to do that
in chunks, to make our lives easier.

In particular, this does not implement
 - Subsumption
 - Mangling
- Satisfaction checking is minimal as we should focus on #141776 first
(note that I'm currently very stuck)

FTM, release notes, status page, etc, will be updated once the feature
is more mature. Given the state of the feature, it is not yet allowed in
older language modes.

Of note: 
- Mismatches between template template arguments and template template
parameters are a bit wonky. This is addressed by #130603
- We use `UnresolvedLookupExpr` to model template-id. While this is
pre-existing, I have been wondering if we want to introduce a different
OverloadExpr subclass for that. I did not make the change in this patch.</pre>
</div>
</content>
</entry>
<entry>
<title>Ast importer visitors (#138838)</title>
<updated>2025-07-09T18:12:31+00:00</updated>
<author>
<name>ganenkokb-yandex</name>
<email>160136233+ganenkokb-yandex@users.noreply.github.com</email>
</author>
<published>2025-07-09T18:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a57aaedc35a39bd1f573929d5c2cb56fd1cccab4'/>
<id>a57aaedc35a39bd1f573929d5c2cb56fd1cccab4</id>
<content type='text'>
I've rebased commit from
[Evianaive](https://github.com/Evianaive/llvm-project/commits?author=Evianaive)
and compiled it.
I hope it will speed up fix for #129393.

---------

Co-authored-by: Evianaive &lt;153540933@qq.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've rebased commit from
[Evianaive](https://github.com/Evianaive/llvm-project/commits?author=Evianaive)
and compiled it.
I hope it will speed up fix for #129393.

---------

Co-authored-by: Evianaive &lt;153540933@qq.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Do not put the definition of concept nodes in the Sema library (#141104)</title>
<updated>2025-05-22T19:57:45+00:00</updated>
<author>
<name>cor3ntin</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-05-22T19:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73fda8327539106d2644fd3c566e528564f74562'/>
<id>73fda8327539106d2644fd3c566e528564f74562</id>
<content type='text'>
It is a layering violation</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is a layering violation</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][Clang] Adopt simplified `getTrailingObjects` in ASTConcept (#139974)</title>
<updated>2025-05-15T12:32:26+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-15T12:32:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f1eebf9e94e3051e88e8f3d3365b663a88e1ca0a'/>
<id>f1eebf9e94e3051e88e8f3d3365b663a88e1ca0a</id>
<content type='text'>
Use non-templated form of `getTrailingObjects` when using a single
trailing type in `TrailingObjects`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use non-templated form of `getTrailingObjects` when using a single
trailing type in `TrailingObjects`.</pre>
</div>
</content>
</entry>
</feed>
