[all-commits] [llvm/llvm-project] 8a26ec: [clang][NFC] Mark CWG2785 as implemented and add a...
Victor Chernyakin via All-commits
all-commits at lists.llvm.org
Mon May 4 10:17:07 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8a26ecc0b721f882d609bbd9e89af50c63b07abe
https://github.com/llvm/llvm-project/commit/8a26ecc0b721f882d609bbd9e89af50c63b07abe
Author: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: 2026-05-04 (Mon, 04 May 2026)
Changed paths:
M clang/test/CXX/drs/cwg27xx.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
[clang][NFC] Mark CWG2785 as implemented and add a test (#195547)
[CWG2785](https://wg21.link/cwg2785) clarifies that a
*requires-expression* is never type-dependent, it always has type
`bool`. That means that in a snippet like this:
```cpp
void g(void *);
template <typename T>
void f() {
g(requires { T(); });
}
```
The call to `g` should be diagnosed as invalid (`bool` is not
convertible to `void *`) even if the template is never instantiated.
Clang does the right thing since version 10:
https://godbolt.org/z/s61rEbsfz
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list