Issue 113792
Summary Templated lambda ends up with dependent type in C++11
Labels clang:frontend
Assignees
Reporter tbaederr
    This is an issue for the bug from https://github.com/llvm/llvm-project/pull/108598

This code:
```c++
template<typename T>
constexpr T outer() {
  return []<T x>() { return x; }.template operator()<123>();
}
static_assert(outer<int>() == 123);
```

ends up with a dependent type that we assert on in codegen.

This starts when we deduce the type of the call operator, which is dependent in C++11 but `auto` in later versions:
https://github.com/llvm/llvm-project/blob/7b88e7530d4329ff0c7c8638f69b39fa1e540218/clang/lib/Sema/SemaType.cpp#L958-L973

and we never seem to clean this up.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to