History log of /llvm-project/clang/include/clang/AST/ASTConcept.h (Results 1 – 25 of 25)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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
# 1fa7f05b 05-Aug-2024 Kazu Hirata <kazu@google.com>

[clang] Construct SmallVector with ArrayRef (NFC) (#101898)


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# fb196495 13-Jul-2024 Younan Zhang <zyn7109@gmail.com>

[Clang][NFCI] Remove records of unsatisfied atomic expressions in ConstraintSatisfaction (#98654)

This expression doesn't appear to be ever used, so let's remove it from
the data structure.

Fixe

[Clang][NFCI] Remove records of unsatisfied atomic expressions in ConstraintSatisfaction (#98654)

This expression doesn't appear to be ever used, so let's remove it from
the data structure.

Fixed some spelling issues as well.

show more ...


Revision tags: 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, llvmorg-17.0.0-rc4
# da5e11cd 31-Aug-2023 Sam McCall <sam.mccall@gmail.com>

[AST] Support ConceptReference in DynTypedNode, add dump().

The dump() is not actually included recursively in any other nodes' dump,
as this is too verbose (similar to NNS) but useful in its own ri

[AST] Support ConceptReference in DynTypedNode, add dump().

The dump() is not actually included recursively in any other nodes' dump,
as this is too verbose (similar to NNS) but useful in its own right.

It's unfortunate to not have the actual tests yet, but the DynTypedNode
tests are matcher-based and adding matchers is a larger task than
DynTypedNode support (but can't be done first).

(I've got a clangd change stacked on this that uses DynTypedNode and
dump(), and both work. I'll send a change for matchers next).

Differential Revision: https://reviews.llvm.org/D159300

show more ...


# 67136522 01-Sep-2023 Bill Wendling <morbo@google.com>

[NFC] Cleanup some #includes in header files

Limit the #includes to the least necessary to still compile. Move the
"new" function into the .cpp file to remove the need to #include
ASTContext.h into

[NFC] Cleanup some #includes in header files

Limit the #includes to the least necessary to still compile. Move the
"new" function into the .cpp file to remove the need to #include
ASTContext.h into ASTConcept.h.

Differential Revision: https://reviews.llvm.org/D159320

show more ...


Revision tags: 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, 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
# b3ce8728 29-Nov-2022 Utkarsh Saxena <usx@google.com>

Make evaluation of nested requirement consistent with requires expr.

Fixes: https://github.com/llvm/llvm-project/issues/45563
```
template<class T> concept True = true;

template <class T>
concept

Make evaluation of nested requirement consistent with requires expr.

Fixes: https://github.com/llvm/llvm-project/issues/45563
```
template<class T> concept True = true;

template <class T>
concept C1 = requires (T) {
requires True<typename T::value> || True<T>;
};

template <class T>
constexpr bool foo()
requires True<typename T::value> || True<T> {
return true;
}
static_assert(C1<double>); // Previously failed due to SFINAE error
static_assert(foo<int>()); // but this works fine.
```
The issue here is the discrepancy between how a [nested requirement is evaluated](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaTemplateInstantiate.cpp#L2331) Vs how a [non-nested requirement is evaluated](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaConcept.cpp#L167-L200).

This patch makes constraint checking consistent for nested requirement
and trailing requires expressions by reusing the same evaluator.

Differential Revision: https://reviews.llvm.org/D138914

show more ...


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2
# 684a7896 26-Sep-2022 Erich Keane <erich.keane@intel.com>

Reapply "[Concepts] Recover properly from a RecoveryExpr in a concept"

This reverts commit 192d69f7e65a625e344421841e731e39f80595f5.

This fixes the condition to check whether this is a situation wh

Reapply "[Concepts] Recover properly from a RecoveryExpr in a concept"

This reverts commit 192d69f7e65a625e344421841e731e39f80595f5.

This fixes the condition to check whether this is a situation where we
are in a recovery-expr'ed concept a little better, so we don't access an
inactive member of a union, which should make the bots happy.

Differential Revision: https://reviews.llvm.org/D134542

show more ...


# 192d69f7 26-Sep-2022 Erich Keane <erich.keane@intel.com>

Revert "[Concepts] Recover properly from a RecoveryExpr in a concept"

This reverts commit e3d14bee238b672a7a112311eefee55e142eaefc.

There are apparently a large number of crashes in libcxx and some

Revert "[Concepts] Recover properly from a RecoveryExpr in a concept"

This reverts commit e3d14bee238b672a7a112311eefee55e142eaefc.

There are apparently a large number of crashes in libcxx and some JSON
Parser thing, so clearly this has some sort of serious issue. Reverting
so I can take some time to figure out what is going on.

show more ...


# e3d14bee 23-Sep-2022 Erich Keane <erich.keane@intel.com>

[Concepts] Recover properly from a RecoveryExpr in a concept

Discovered by reducing a different problem, we currently assert because
we failed to make the constraint expressions not dependent, since

[Concepts] Recover properly from a RecoveryExpr in a concept

Discovered by reducing a different problem, we currently assert because
we failed to make the constraint expressions not dependent, since a
RecoveryExpr cannot be transformed.

This patch fixes that, and gets reasonably nice diagnostics by
introducing a concept (hah!) of "ContainsErrors" to the Satisfaction
types, which causes us to treat the candidate as non-viable.

However, just making THAT candidate non-viable would result in choosing
the 'next best' canddiate, which can result in awkward errors, where we
start evaluating a candidate that is not intended to be selected.
Because of this, and to make diagnostics more relevant, we now just
cause the entire lookup to result in a 'no-viable-candidates'.

This means we will only emit the list of candidates, rather than any
cascading failures.

show more ...


Revision tags: 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
# cb7f806a 13-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-rc2
# 7485e6c7 10-Jan-2022 Kazu Hirata <kazu@google.com>

Revert "[clang] Remove redundant member initialization (NFC)"

This reverts commit 80e2c587498a7b2bf14dde47a33a058da6e88a9a.

The original patch causes a lot of warnings on gcc like:

llvm-project/

Revert "[clang] Remove redundant member initialization (NFC)"

This reverts commit 80e2c587498a7b2bf14dde47a33a058da6e88a9a.

The original patch causes a lot of warnings on gcc like:

llvm-project/clang/include/clang/Basic/Diagnostic.h:1329:3: warning:
base class ‘class clang::StreamingDiagnostic’ should be explicitly
initialized in the copy constructor [-Wextra]

show more ...


# ac2090d5 09-Jan-2022 Kazu Hirata <kazu@google.com>

[clang] Remove unused forward declarations (NFC)


# 80e2c587 09-Jan-2022 Kazu Hirata <kazu@google.com>

[clang] Remove redundant member initialization (NFC)

Identified with readability-redundant-member-init.


# 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
# c874dd53 05-Aug-2021 Christopher Di Bella <cjdb@google.com>

[llvm][clang][NFC] updates inline licence info

Some files still contained the old University of Illinois Open Source
Licence header. This patch replaces that with the Apache 2 with LLVM
Exception li

[llvm][clang][NFC] updates inline licence info

Some files still contained the old University of Illinois Open Source
Licence header. This patch replaces that with the Apache 2 with LLVM
Exception licence.

Differential Revision: https://reviews.llvm.org/D107528

show more ...


Revision tags: 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
# 30a89a75 07-Jun-2021 Simon Pilgrim <llvm-dev@redking.me.uk>

ASTConcept.h - remove unused <string> include. NFCI.


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, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2
# 665dcdac 12-Feb-2020 Sven van Haastregt <sven.vanhaastregt@arm.com>

Add missing newlines at EOF; NFC


Revision tags: llvmorg-10.0.0-rc1
# 713562f5 25-Jan-2020 Saar Raz <saar@raz.email>

[Concepts] Transform constraints of non-template functions to ConstantEvaluated

We would previously try to evaluate atomic constraints of non-template functions as-is,
and since they are now unevalu

[Concepts] Transform constraints of non-template functions to ConstantEvaluated

We would previously try to evaluate atomic constraints of non-template functions as-is,
and since they are now unevaluated at first, this would cause incorrect evaluation (bugs #44657, #44656).

Substitute into atomic constraints of non-template functions as we would atomic constraints
of template functions, in order to rebuild the expressions in a constant-evaluated context.

show more ...


# b933d37c 22-Jan-2020 Saar Raz <saar@raz.email>

[Concepts] Constraint Satisfaction Caching

Add a simple cache for constraint satisfaction results. Whether or not this simple caching
would be permitted in final C++2a is currently being discussed b

[Concepts] Constraint Satisfaction Caching

Add a simple cache for constraint satisfaction results. Whether or not this simple caching
would be permitted in final C++2a is currently being discussed but it is required for
acceptable performance so we use it in the meantime, with the possibility of adding some
cache invalidation mechanisms later.

Differential Revision: https://reviews.llvm.org/D72552

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 ...


# baa84d8c 18-Jan-2020 Saar Raz <saar@raz.email>

Revert "[Concepts] Requires Expressions"

This reverts commit 027931899763409e2c61a84bdee6057b5e838ffa.

There have been some failing tests on some platforms, reverting while investigating.


# 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


Revision tags: llvmorg-11-init
# ff1e0fce 15-Jan-2020 Saar Raz <saar@raz.email>

[Concepts] Type Constraints

Add support for type-constraints in template type parameters.
Also add support for template type parameters as pack expansions (where the type constraint can now contain

[Concepts] Type Constraints

Add support for type-constraints in template type parameters.
Also add support for template type parameters as pack expansions (where the type constraint can now contain an unexpanded parameter pack).

Differential Revision: https://reviews.llvm.org/D44352

show more ...


Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3
# fdf80e86 05-Dec-2019 Saar Raz <saar@raz.email>

[Concepts] Constraint Enforcement & Diagnostics

Part of the C++20 concepts implementation effort.
- Associated constraints (requires clauses, currently) are now enforced when instantiating/specializ

[Concepts] Constraint Enforcement & Diagnostics

Part of the C++20 concepts implementation effort.
- Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads.
- Elaborated diagnostics give helpful insight as to why the constraints were not satisfied.
Phabricator: D41569

Re-commit, after fixing some memory bugs.

show more ...


Revision tags: llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1
# ffa214ef 24-Oct-2019 Saar Raz <saar@raz.email>

[Concepts] Constraint Enforcement & Diagnostics

Part of the C++20 concepts implementation effort.
- Associated constraints (requires clauses, currently) are now enforced when instantiating/specializ

[Concepts] Constraint Enforcement & Diagnostics

Part of the C++20 concepts implementation effort.
- Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads.
- Elaborated diagnostics give helpful insight as to why the constraints were not satisfied.
Phabricator: D41569

show more ...