-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
c++20clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsinvalid-code-generationTool (e.g. clang-format) produced invalid code that no longer compilesTool (e.g. clang-format) produced invalid code that no longer compiles
Description
The following shouldn't be well-formed, but it is in Clang.
template<class T>
using with_reference = T&;
template<class T>
concept can_reference = requires {
typename with_reference<T>;
};
template<class T>
concept dereferenceable = requires(T& t) {
{ *t } -> can_reference;
};
static_assert(dereferenceable<void*>);
Clang invocation: clang++ -std=c++20 -pedantic -pedantic-errors file.cpp
Version:
clang version 15.0.0 (https://github.com/llvm/llvm-project.git 186a13f647acac623898bcffa4b966624d2358ba)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-trunk/bin
Metadata
Metadata
Assignees
Labels
c++20clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsC++20 conceptsinvalid-code-generationTool (e.g. clang-format) produced invalid code that no longer compilesTool (e.g. clang-format) produced invalid code that no longer compiles
Type
Projects
Status
Done