Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
63d9ef5e |
| 24-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[AST] Migrate away from PointerUnion::{is,get} (NFC) (#117469)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_c
[AST] Migrate away from PointerUnion::{is,get} (NFC) (#117469)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
dec6324c |
| 17-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[AST] Remove unused includes (NFC) (#116549)
Identified with misc-include-cleaner.
|
Revision tags: 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, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, 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, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
4b163e34 |
| 13-Sep-2023 |
Richard Smith <richard@metafoo.co.uk> |
Implement mangling rules for C++20 concepts and requires-expressions.
This implements proposals from:
- https://github.com/itanium-cxx-abi/cxx-abi/issues/24: mangling for constraints, requires-cl
Implement mangling rules for C++20 concepts and requires-expressions.
This implements proposals from:
- https://github.com/itanium-cxx-abi/cxx-abi/issues/24: mangling for constraints, requires-clauses, requires-expressions. - https://github.com/itanium-cxx-abi/cxx-abi/issues/31: requires-clauses and template parameters in a lambda expression are mangled into the <lambda-sig>. - https://github.com/itanium-cxx-abi/cxx-abi/issues/47 (STEP 3): mangling for template argument is prefixed by mangling of template parameter declaration if it's not "obvious", for example because the template parameter is constrained (we already implemented STEP 1 and STEP 2).
This changes the manglings for a few cases:
- Functions and function templates with constraints. - Function templates with template parameters with deduced types: `typename<auto N> void f();` - Function templates with template template parameters where the argument has a different template-head: `template<template<typename...T>> void f(); f<std::vector>();`
In each case where a mangling changed, the change fixes a mangling collision.
Note that only function templates are affected, not class templates or variable templates, and only new constructs (template parameters with deduced types, constrained templates) and esoteric constructs (templates with template template parameters with non-matching template template arguments, most of which Clang still does not accept by default due to `-frelaxed-template-template-args` not being enabled by default), so the risk to ABI stability from this change is relatively low. Nonetheless, `-fclang-abi-compat=17` can be used to restore the old manglings for cases which we could successfully but incorrectly mangle before.
Fixes #48216, #49884, #61273
Reviewed By: erichkeane, #libc_abi
Differential Revision: https://reviews.llvm.org/D147655
show more ...
|
Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2 |
|
#
c2bf9baf |
| 02-Aug-2023 |
Jens Massberg <massberg@google.com> |
Add a concept AST node.
This patch adds a concept AST node (`ConceptLoc`) and uses it at the corresponding places.
There are three objects that might have constraints via concepts: `TypeConstraint`
Add a concept AST node.
This patch adds a concept AST node (`ConceptLoc`) and uses it at the corresponding places.
There are three objects that might have constraints via concepts: `TypeConstraint`, `ConceptSpecializationExpr` and `AutoTypeLoc`. The first two inherit from `ConceptReference` while the latter has the information about a possible constraint directly stored in `AutoTypeLocInfo`. It would be nice if the concept information would be stored the same way in all three cases.
Moreover the current structure makes it difficult to deal with these concepts. For example in Clangd accessing the locations of constraints of a `AutoTypeLoc` can only be done with quite ugly hacks.
So we think that it makes sense to create a new AST node for such concepts.
In details we propose the following: - Rename `ConceptReference` to `ConceptLoc` (or something else what is approriate) and make it the new AST node. - `TypeConstraint` and `ConceptSpecializationExpr` do not longer inherit from `ConceptReference` but store a pointer to a `ConceptLoc`. - `AutoTypeLoc` stores a pointer to `ConceptLoc` instead of storing the concept info in `AutoTypeLocInfo`.
This patch implements a first version of this idea which compiles and where the existing tests pass. To make this patch as small as possible we keep the existing member functions to access concept data. Later these can be replaced by directly calling the corresponding functions of the `ConceptLoc`s.
Differential Revision: https://reviews.llvm.org/D155858
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1 |
|
#
1f48a1fc |
| 29-Mar-2023 |
Walter Gray <yeswalrus@gmail.com> |
Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing ASTs
Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing
Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing ASTs
Fix ArgsAsWritten being null for ConceptSpecializationExpr in certain circumstances when parsing ASTs
ASTStmtWriter::VisitConceptSpecializationExpr specifically expects getTemplateArgsAsWritten() to return true, which it wasn't when parsed by ASTContext.cpp in certain edge cases.
Fixes: #61486
Differential Revision: https://reviews.llvm.org/D146678
show more ...
|
#
98ea4712 |
| 29-Mar-2023 |
Erich Keane <erich.keane@intel.com> |
Properly Propagate RecoveryExpr through RequiresExpr
Commit 3d7946c58 implemented a DR that allowed us to error in a case where an ill-formedness in a RequiresExpr is diagnosed as a satisfaction fai
Properly Propagate RecoveryExpr through RequiresExpr
Commit 3d7946c58 implemented a DR that allowed us to error in a case where an ill-formedness in a RequiresExpr is diagnosed as a satisfaction failure. However, it failed to cover cases where the RequiresExpr had Requirements that failed for similar reasons.
This patch propagates the RecoveryExpr "containsErrors" correctly through RequiresExpr.
Fixes: #61776
show more ...
|
Revision tags: 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, llvmorg-15.0.4 |
|
#
975740bf |
| 24-Oct-2022 |
Erich Keane <erich.keane@intel.com> |
"Reapply "GH58368: Correct concept checking in a lambda defined in concept""
This reverts commit cecc9a92cfca71c1b6c2a35c5e302ab649496d11.
The problem ended up being how we were handling the lambda
"Reapply "GH58368: Correct concept checking in a lambda defined in concept""
This reverts commit cecc9a92cfca71c1b6c2a35c5e302ab649496d11.
The problem ended up being how we were handling the lambda-context in code generation: we were assuming any decl context here would be a named-decl, but that isn't the case. Instead, we just replace it with the concept's owning context.
Differential Revision: https://reviews.llvm.org/D136451
show more ...
|
#
cecc9a92 |
| 24-Oct-2022 |
Erich Keane <erich.keane@intel.com> |
Revert "Reapply "GH58368: Correct concept checking in a lambda defined in concept"""
This reverts commit b876f6e2f28779211a829d7d4e841fe68885ae20.
Still getting build failures on PPC AIX that aren'
Revert "Reapply "GH58368: Correct concept checking in a lambda defined in concept"""
This reverts commit b876f6e2f28779211a829d7d4e841fe68885ae20.
Still getting build failures on PPC AIX that aren't obvious what is causing them, so reverting while I try to figure this out.
show more ...
|
#
b876f6e2 |
| 24-Oct-2022 |
Erich Keane <erich.keane@intel.com> |
Reapply "GH58368: Correct concept checking in a lambda defined in concept""
This reverts commit 52930162870fee52d0d9c07c5d66e5dce32b08e8.
Now with updating the ASTBitcodes to show that this AST is
Reapply "GH58368: Correct concept checking in a lambda defined in concept""
This reverts commit 52930162870fee52d0d9c07c5d66e5dce32b08e8.
Now with updating the ASTBitcodes to show that this AST is incompatible from the last.
show more ...
|
#
52930162 |
| 24-Oct-2022 |
Erich Keane <erich.keane@intel.com> |
Revert "GH58368: Correct concept checking in a lambda defined in concept"
This reverts commit b7c922607c5ba93db8b893d4ba461052af8317b5.
This seems to cause some problems with some modules related t
Revert "GH58368: Correct concept checking in a lambda defined in concept"
This reverts commit b7c922607c5ba93db8b893d4ba461052af8317b5.
This seems to cause some problems with some modules related things, which makes me think I should have updated the version-major in ast-bit-codes? Going to revert to confirm this was a problem, then change that and re-try a commit.
show more ...
|
#
b7c92260 |
| 20-Oct-2022 |
Erich Keane <erich.keane@intel.com> |
GH58368: Correct concept checking in a lambda defined in concept
As that bug reports, the problem here is that the lambda's 'context-decl' was not set to the concept, and the lambda picked up templa
GH58368: Correct concept checking in a lambda defined in concept
As that bug reports, the problem here is that the lambda's 'context-decl' was not set to the concept, and the lambda picked up template arguments from the concept. SO, we failed to get the correct template arguments in SemaTemplateInstantiate.
However, a Concept Specialization is NOT a decl, its an expression, so we weren't able to put the concept in the decl tree like we needed. This patch introduces a ConceptSpecializationDecl, which is the smallest type possible to use for this purpose, containing only the template arguments.
The net memory impliciation of this is turning a trailing-objects into a pointer to a type with trailing-objects, so it should be minor.
As future work, we may consider giving this type more responsibility, or figuring out how to better merge duplicates, but as this is just a template-argument collection at the moment, there isn't much value to it.
Differential Revision: https://reviews.llvm.org/D136451
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, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
d677a7cb |
| 02-Jan-2022 |
Kazu Hirata <kazu@google.com> |
[clang] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
#
aef5d8fd |
| 04-Jun-2021 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] NFC: Rename rvalue to prvalue
This renames the expression value categories from rvalue to prvalue, keeping nomenclature consistent with C++11 onwards.
C++ has the most complicated taxonomy
[clang] NFC: Rename rvalue to prvalue
This renames the expression value categories from rvalue to prvalue, keeping nomenclature consistent with C++11 onwards.
C++ has the most complicated taxonomy here, and every other language only uses a subset of it, so it's less confusing to use the C++ names consistently, and mentally remap to the C names when working on that context (prvalue -> rvalue, no xvalues, etc).
Renames: * VK_RValue -> VK_PRValue * Expr::isRValue -> Expr::isPRValue * SK_QualificationConversionRValue -> SK_QualificationConversionPRValue * JSON AST Dumper Expression nodes value category: "rvalue" -> "prvalue"
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D103720
show more ...
|
Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5 |
|
#
b4f02d89 |
| 18-Mar-2020 |
Sam McCall <sam.mccall@gmail.com> |
[AST] Make Expr::setDependence protected and remove add/removeDependence. NFC
Summary: The expected pattern is for subclasses to initialize through computeDependence, which needs only setDependence.
[AST] Make Expr::setDependence protected and remove add/removeDependence. NFC
Summary: The expected pattern is for subclasses to initialize through computeDependence, which needs only setDependence. The few places that still use addDependence can be simulated with get+set.
Reviewers: hokein
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D76392
show more ...
|
#
876bb86e |
| 17-Mar-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[AST] Move dependence computations into a separate file
To group the code in one place, simplify it and make it easier to add the containsErrors bit and find existing bugs.
Reviewers: sammccall
Re
[AST] Move dependence computations into a separate file
To group the code in one place, simplify it and make it easier to add the containsErrors bit and find existing bugs.
Reviewers: sammccall
Reviewed By: sammccall
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73638
show more ...
|
#
18c97662 |
| 16-Mar-2020 |
Haojian Wu <hokein.wu@gmail.com> |
Revert "[AST] Move dependence computations into a separate file"
This reverts commit ddd20ed1586c55947e84620d674a60c118ec6905. The patch was landed by accident.
|
Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
ddd20ed1 |
| 27-Jan-2020 |
Ilya Biryukov <ibiryukov@google.com> |
[AST] Move dependence computations into a separate file
To group the code in one place, simplify it and make it easier to add the containsErrors bit and find existing bugs.
|
#
67d25914 |
| 16-Mar-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[AST] rename DependencyFlags.h => DependenceFlags.h, NFC
We forgot to fix in the previous patch.
|
#
ec3060c7 |
| 02-Mar-2020 |
Ilya Biryukov <ibiryukov@google.com> |
[AST] Refactor propagation of dependency bits. NFC
Summary: This changes introduces an enum to represent dependencies as a bitmask and extract common patterns from code that computes dependency bits
[AST] Refactor propagation of dependency bits. NFC
Summary: This changes introduces an enum to represent dependencies as a bitmask and extract common patterns from code that computes dependency bits into helper functions.
Reviewers: rsmith, martong, shafik, ilya-biryukov, hokein
Subscribers: hokein, sammccall, Mordante, riccibruno, merge_guards_bot, rnkovacs, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71920
show more ...
|
#
c83d9bed |
| 30-Jan-2020 |
Saar Raz <saar@raz.email> |
[Concept] Fix incorrect check for containsUnexpandedParameterPack in CSE
We previously checked for containsUnexpandedParameterPack in CSEs by observing the property in the converted arguments of the
[Concept] Fix incorrect check for containsUnexpandedParameterPack in CSE
We previously checked for containsUnexpandedParameterPack in CSEs by observing the property in the converted arguments of the CSE. This may not work if the argument is an expanded type-alias that contains a pack-expansion (see added test).
Check the as-written arguments when determining containsUnexpandedParameterPack and isInstantiationDependent.
show more ...
|
#
a0f50d73 |
| 18-Jan-2020 |
Saar Raz <saar@raz.email> |
[Concepts] Requires Expressions
Implement support for C++2a requires-expressions.
Re-commit after compilation failure on some platforms due to alignment issues with PointerIntPair.
Differential Re
[Concepts] Requires Expressions
Implement support for C++2a requires-expressions.
Re-commit after compilation failure on some platforms due to alignment issues with PointerIntPair.
Differential Revision: https://reviews.llvm.org/D50360
show more ...
|
#
02793189 |
| 18-Jan-2020 |
Saar Raz <saar@raz.email> |
[Concepts] Requires Expressions
Implement support for C++2a requires-expressions.
Differential Revision: https://reviews.llvm.org/D50360
|