Open Quuxplusone opened 5 years ago
Bugzilla Link | PR43816 |
Status | NEW |
Importance | P enhancement |
Reported by | Alexander Lanin (llvm@alex.lanin.de) |
Reported on | 2019-10-26 03:57:21 -0700 |
Last modified on | 2019-11-05 10:06:50 -0800 |
Version | trunk |
Hardware | PC Linux |
CC | llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Clang itself emits the same warning and suggestion, but there is no way to fix-it from there.
This can be accomplished today by using the -fixit flag. Right now that's not exposed by the driver, so you need to use -Xclang -fixit; maybe we should consider exposing it for end user use.
One more thing: it's impossible to disable those fix-its in clang-tidy. They
are always enabled.
Use-Case: I'm creating separate commits for each clang-tidy fixit while ~100
other people write more code. So the result is that sometimes a clang fix-it
sneaks into one of my commits.
E.g. I want a commit with only modernize-use-equals-default, but I have
(correct) improvements about "return std::move(...)" --> "return ..." in the
same commit. I have to remove them manually in order to apply them separately
later.