Issue 243877
Summary [CIR] Assertion failure when generating CIR for a template static data member initializer containing a block
Labels crash, ClangIR
Assignees
Reporter hongtaihu
    ```cxx
template <typename T>
struct v {
  static T i;
};

template <typename T>
T v<T>::i = ^{ static T i = T(); return i; }();

template class v<char>;
template class v<int>;
```
The source code comes from https://github.com/llvm/llvm-project/pull/241906. So, it seems this test case is useful for not only codegen but also clangIR lol.

https://godbolt.org/z/sx1nfo3Mq

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to