https://bugs.llvm.org/show_bug.cgi?id=42108
Bug ID: 42108
Summary: locally created const reference template argument
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: arbm...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
This code crashes the clang frontend.
```
struct I {};
template<const I&>
void func() {}
auto testFunc() {
return func<I{}>(); // crash
}
```
It's the same for struct/classes. See: https://clang.godbolt.org/z/W-izMz
The expected behavior:
* clang does not crash
* correct diagnostics message
--
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