-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]
Description
| Bugzilla Link | 47119 |
| Version | trunk |
| OS | Windows NT |
| Attachments | compiler output |
| CC | @DougGregor,@bernd5,@ojeda,@zygoloid |
Extended Description
Clang++ front-end crashes with the following code:
Compilation command: clang++ -std=c++17 sample.cpp
See here on godbolt: https://godbolt.org/z/o1xjK8
Code:
#include <type_traits>
struct S {
void Func() {
}
};
#include <iostream>
int main()
{
auto lambda = [](const auto& cls) -> decltype(
std::remove_const_t<std::remove_reference_t<decltype(cls)>>::Func()
) {};
auto isInv = std::is_invocable_v<decltype(lambda), S>;
if (!isInv){
std::cout << "detected correctly";
}
return 0;
}
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]