Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
7f78f99f |
| 05-Aug-2024 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Reland: Instantiate alias templates with sugar (#101858)
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
T
[clang] Reland: Instantiate alias templates with sugar (#101858)
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.
Differential Revision: https://reviews.llvm.org/D136565
show more ...
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
3cabbf60 |
| 30-May-2024 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] text ast-dumper: dump TemplateName for TST and DTST (#93766)
Implement AST text dumping of the TemplateName for
TemplateSpecializationType and DeducedTemplateSpecializationType.
|
#
1a2f3309 |
| 29-May-2024 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Improve ast-dumper text printing of TemplateArgument (#93431)
This improves and unifies our approach to printing all template
arguments.
The same approach to printing types is extended t
[clang] Improve ast-dumper text printing of TemplateArgument (#93431)
This improves and unifies our approach to printing all template
arguments.
The same approach to printing types is extended to all
TemplateArguments: A sugared version is printed in quotes, followed by
printing the canonical form, unless they would print the same.
Special improvements are done to add more detail to template template
arguments.
It's planned in a future patch to use this improved TemplateName printer
for other places besides TemplateArguments.
Note: The sugared/desugared printing does not show up for TemplateNames
in tests yet, because we do a poor job of preserving their type sugar.
This will be improved in a future patch.
show more ...
|
#
01f143dd |
| 23-May-2024 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] fix printing of canonical template template parameters (#93124)
|
Revision tags: llvmorg-18.1.6 |
|
#
7c1d9b15 |
| 05-May-2024 |
Fangrui Song <i@maskray.me> |
[test] %clang_cc1: remove redundant actions
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
f9ead469 |
| 26-Oct-2023 |
Jessica Clarke <jrtc27@jrtc27.com> |
[AST] Only dump desugared type when visibly different (#65214)
These are an artifact of how types are structured but serve little
purpose, merely showing that the type is sugared in some way. For
[AST] Only dump desugared type when visibly different (#65214)
These are an artifact of how types are structured but serve little
purpose, merely showing that the type is sugared in some way. For
example, ElaboratedType's existence means struct S gets printed as
'struct S':'struct S' in the AST, which is unnecessary visual clutter.
Note that skipping the second print when the types have the same string
matches what we do for diagnostics, where the aka will be skipped.
show more ...
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3 |
|
#
ba15d186 |
| 30-Apr-2023 |
Mark de Wever <koraq@xs4all.nl> |
[clang] Use -std=c++23 instead of -std=c++2b
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete.
This updates the reference to c++2b to c++
[clang] Use -std=c++23 instead of -std=c++2b
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete.
This updates the reference to c++2b to c++23 and updates the __cplusplus macro.
Drive-by fixes c++1z -> c++17 and c++2a -> c++20 when seen.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D149553
show more ...
|
Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5 |
|
#
a5c18fcf |
| 08-Nov-2022 |
Alexander Kornienko <alexfh@google.com> |
Revert "[clang] Instantiate alias templates with sugar"
This reverts commit 279fe6281d2ca5b2318c7437316c28750feaac8d, which causes non-linear compilation time growth. See https://reviews.llvm.org/D1
Revert "[clang] Instantiate alias templates with sugar"
This reverts commit 279fe6281d2ca5b2318c7437316c28750feaac8d, which causes non-linear compilation time growth. See https://reviews.llvm.org/D136565#3914755
show more ...
|
Revision tags: llvmorg-15.0.4 |
|
#
279fe628 |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Instantiate alias templates with sugar
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no
[clang] Instantiate alias templates with sugar
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136565
show more ...
|
#
ab114087 |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Instantiate NTTPs and template default arguments with sugar
This makes use of the changes introduced in D134604, in order to instantiate non-type template parameters and default template arg
[clang] Instantiate NTTPs and template default arguments with sugar
This makes use of the changes introduced in D134604, in order to instantiate non-type template parameters and default template arguments with a final sugared substitution.
This comes at no additional relevant cost. Since we don't track / unique them in specializations, we wouldn't be able to resugar them later anyway.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136564
show more ...
|
#
bf07c338 |
| 28-Oct-2022 |
Haojian Wu <hokein.wu@gmail.com> |
Revert "[clang] Instantiate NTTPs and template default arguments with sugar"
This patch reverts - commit d4b1964f0554046b1e64908e5c1cd701b25f4c9e - commit 59f0827e2cf3755834620e7e0b6d946832440f80([c
Revert "[clang] Instantiate NTTPs and template default arguments with sugar"
This patch reverts - commit d4b1964f0554046b1e64908e5c1cd701b25f4c9e - commit 59f0827e2cf3755834620e7e0b6d946832440f80([clang] Instantiate alias templates with sugar)
As it makes clang fail to pass some code it used to compile. See comments: https://reviews.llvm.org/D136564#3891065
show more ...
|
#
59f0827e |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Instantiate alias templates with sugar
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no
[clang] Instantiate alias templates with sugar
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136565
show more ...
|
#
d4b1964f |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Instantiate NTTPs and template default arguments with sugar
This makes use of the changes introduced in D134604, in order to
instantiate non-type template parameters and default template
[clang] Instantiate NTTPs and template default arguments with sugar
This makes use of the changes introduced in D134604, in order to
instantiate non-type template parameters and default template arguments
with a final sugared substitution.
This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136564
show more ...
|
#
63f465b7 |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Perform sugared substitution of builtin templates
Since these are much like template type aliases, where we don't
track a specialization for them and just substitute them eagerly,
we can
[clang] Perform sugared substitution of builtin templates
Since these are much like template type aliases, where we don't
track a specialization for them and just substitute them eagerly,
we can't resugar them anyway, and there is no relevant cost in just
performing a finalizing sugared substitution.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136563
show more ...
|
#
434a238a |
| 26-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
Revert "[clang] Perform sugared substitution of builtin templates"
This reverts commit e5d9e802e50dd55a326e31a0d562e5263b208f3b.
|
#
a88ebd40 |
| 26-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
Revert "[clang] Instantiate NTTPs and template default arguments with sugar"
This reverts commit 2560c1266993af6e6c15900ce673c6db23132f8b.
|
#
a58d83b2 |
| 26-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
Revert "[clang] Instantiate alias templates with sugar"
This reverts commit 4c44c91ad980304c5cca3792115349e68cfafd2b.
|
#
4c44c91a |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Instantiate alias templates with sugar
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no
[clang] Instantiate alias templates with sugar
This makes use of the changes introduced in D134604, in order to
instantiate alias templates witn a final sugared substitution.
This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136565
show more ...
|
#
2560c126 |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Instantiate NTTPs and template default arguments with sugar
This makes use of the changes introduced in D134604, in order to
instantiate non-type template parameters and default template
[clang] Instantiate NTTPs and template default arguments with sugar
This makes use of the changes introduced in D134604, in order to
instantiate non-type template parameters and default template arguments
with a final sugared substitution.
This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136564
show more ...
|
#
e5d9e802 |
| 23-Oct-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Perform sugared substitution of builtin templates
Since these are much like template type aliases, where we don't
track a specialization for them and just substitute them eagerly,
we can
[clang] Perform sugared substitution of builtin templates
Since these are much like template type aliases, where we don't
track a specialization for them and just substitute them eagerly,
we can't resugar them anyway, and there is no relevant cost in just
performing a finalizing sugared substitution.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136563
show more ...
|
Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
bcd9ba2b |
| 14-Aug-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Track the templated entity in type substitution.
This is a change to how we represent type subsitution in the AST. Instead of only storing the replaced type, we track the templated entity we
[clang] Track the templated entity in type substitution.
This is a change to how we represent type subsitution in the AST. Instead of only storing the replaced type, we track the templated entity we are substituting, plus an index. We modify MLTAL to track the templated entity at each level.
Otherwise, it's much more expensive to go from the template parameter back to the templated entity, and not possible to do in some cases, as when we instantiate outer templates, parameters might still reference the original entity.
This also allows us to very cheaply lookup the templated entity we saw in the naming context and find the corresponding argument it was replaced from, such as for implementing template specialization resugaring.
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D131858
show more ...
|
#
f4ea3bd4 |
| 03-Sep-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] Fixes how we represent / emulate builtin templates
We change the template specialization of builtin templates to behave like aliases.
Though unlike real alias templates, these might still p
[clang] Fixes how we represent / emulate builtin templates
We change the template specialization of builtin templates to behave like aliases.
Though unlike real alias templates, these might still produce a canonical TemplateSpecializationType when some important argument is dependent.
For example, we can't do anything about make_integer_seq when the count is dependent, or a type_pack_element when the index is dependent.
We change type deduction to not try to deduce canonical TSTs of builtin templates.
We also change those buitin templates to produce substitution sugar, just like a real instantiation would, making the resulting type correctly represent the template arguments used to specialize the underlying template.
And make_integer_seq will now produce a TST for the specialization of it's first argument, which we use as the underlying type of the builtin alias.
When performing member access on the resulting type, it's now possible to map from a Subst* node to the template argument as-written used in a regular fashion, without special casing.
And this fixes a bunch of bugs with relation to these builtin templates factoring into deduction.
Fixes GH42102 and GH51928.
Depends on D133261
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D133262
show more ...
|
#
591452eb |
| 03-Sep-2022 |
Matheus Izvekov <mizvekov@gmail.com> |
NFC: [clang] add template AST test for make_integer_seq and type_pack_element
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D133261
|