Skip to content

ICE: is_invocable_v (access via :: of non static member) #46463

@bernd5

Description

@bernd5
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

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++17clang:frontendLanguage frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions