Segfault with performance-unnecessary-value-param check #45855
Labels
bugzilla
Issues migrated from bugzilla
clang-tidy
confirmed
Verified by a second party
crash
Prefer [crash-on-valid] or [crash-on-invalid]
Extended Description
Running
clang-tidy -checks='performance-unnecessary-value-param' bug.cc
on the following code results in a segfault:
struct Foo {
Foo(const Foo&) {}
};
template
bool recur(unsigned x, T&& val) {
if (x == 0) {
return false;
}
return recur(x / 2, val);
}
void bar(Foo entry) {
recur(0, entry);
}
Both clang 10.0.0 and current trunk (clang 11) segfault (see https://godbolt.org/z/gzVMqr).
The text was updated successfully, but these errors were encountered: