Skip to content
Commit de7a30cb authored by Tamas Zolnai's avatar Tamas Zolnai
Browse files

[clang-tidy] new check: bugprone-unhandled-self-assignment

Summary:
This check searches for copy assignment operators which might not handle self-assignment properly. There are three patterns of
handling a self assignment situation: self check, copy-and-swap or the less common copy-and-move. The new check warns if none of
these patterns is found in a user defined implementation.

See also:
OOP54-CPP. Gracefully handle self-copy assignment
https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP54-CPP.+Gracefully+handle+self-copy+assignment

Reviewers: JonasToth, alexfh, hokein, aaron.ballman

Subscribers: riccibruno, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D60507

llvm-svn: 360540
parent ab8cde44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment