https://bugs.llvm.org/show_bug.cgi?id=49709
Bug ID: 49709
Summary: clang parser crash for instantiating char array
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Created attachment 24688
--> https://bugs.llvm.org/attachment.cgi?id=24688&action=edit
.cpp file demonstrating bug
This will cause a crash in clang-11.1.0, but not in gcc-10.2.0:
constexpr auto a(auto&& s) noexcept
{
return s[0];
}
template <char ...c>
constexpr auto operator "" _lol() noexcept
{
return a((char[]){c...});
}
int main()
{
return "123"_lol;
}
Compile with:
clang++ -std=c++20 t.cpp -o t
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs