-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
accepts-invalidbugzillaIssues migrated from bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"cwg-issueAn issue that was filed to the Core Working GroupAn issue that was filed to the Core Working GrouplambdaC++11 lambda expressionsC++11 lambda expressions
Description
| Bugzilla Link | 26166 |
| Version | trunk |
| OS | Windows NT |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
auto l = [] () -> void {};
struct s {friend void decltype(l)::operator()() const;};
The above spuriously succeeds.
NB: For unbeknown reasons, the trailing return type is necessary. How come the return type differs from void if it isn't supplied? E.g. in the same sample program without -> void, the assertion
static_assert(std::is_same<decltype(&decltype(l)::operator()), void(decltype(l)::*)() const>{});
succeeds.
Metadata
Metadata
Assignees
Labels
accepts-invalidbugzillaIssues migrated from bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"cwg-issueAn issue that was filed to the Core Working GroupAn issue that was filed to the Core Working GrouplambdaC++11 lambda expressionsC++11 lambda expressions