diff options
author | 刘雨培 <liuyupei951018@hotmail.com> | 2024-01-05 01:32:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 01:32:10 +0800 |
commit | e78a1f491cbc0a57de7bf86058359dd0bd282540 (patch) | |
tree | 6c4ff6d10765df5cbce2af0a4568b104e2f290a0 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 9f9dd6be0d21a156dcfee01ebbd571eca79b08bd (diff) | |
download | llvm-e78a1f491cbc0a57de7bf86058359dd0bd282540.zip llvm-e78a1f491cbc0a57de7bf86058359dd0bd282540.tar.gz llvm-e78a1f491cbc0a57de7bf86058359dd0bd282540.tar.bz2 |
[Clang] Fix the instantiation of return type requirements in lambda bodies (#76967)
Currently, due to the incomplete implementation of p0588r1, the
instantiation of lambda expressions leads to the instantiation of the
body. And `EvaluateConstraints` is false during the instantiation of the
body, which causes crashes during the instantiation of the return type
requirement:
```cpp
template<typename T> concept doesnt_matter = true;
template<class T>
concept test =
[]{
return requires(T t) {
{ t } -> doesnt_matter; // crash
};
}();
static_assert(test<int>);
```
Although a complete implementation of p0588r1 can solve these crashes,
it will take some time. Therefore, this pull request aims to fix these
crashes first.
Fixes https://github.com/llvm/llvm-project/issues/63808
Fixes https://github.com/llvm/llvm-project/issues/64607
Fixes https://github.com/llvm/llvm-project/issues/64086
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions