-
Notifications
You must be signed in to change notification settings - Fork 15k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang-tidyconfirmedVerified by a second partyVerified by a second partycrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]
Description
Bugzilla Link | 46510 |
Version | unspecified |
OS | Linux |
CC | @EugeneZelenko,@fberger,@irishrover |
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).
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang-tidyconfirmedVerified by a second partyVerified by a second partycrashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]