Add test to avoid self-assgin in fuzzer::Command
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Actually in this case self assignment looks like not a problem. If it's so it's recommended not to a check one. string and bool is safe to self assign. Did I miss something?
Comment Actions
Yes, for now, this class is safe to do self-assign. But I think it is best to avoid doing that for it has no benefit doing so.
Comment Actions
Here the reasoning. This one is not performance critical, but I don't see a point to break the rule.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c62-make-copy-assignment-safe-for-self-assignment