https://bugs.llvm.org/show_bug.cgi?id=47119

            Bug ID: 47119
           Summary: ICE: is_invocable_v (access via :: of non static
                    member)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: familiebauma...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Created attachment 23840
  --> https://bugs.llvm.org/attachment.cgi?id=23840&action=edit
compiler output

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;
}
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to