llvm-project/clang-tools-extra/clang-tidy
Tamas Zolnai de7a30cb0a [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
2019-05-12 12:23:56 +00:00
..
abseil [clang-tidy] Move all checks to the new registerPPCallbacks API 2019-03-22 18:58:12 +00:00
android [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
boost [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
bugprone [clang-tidy] new check: bugprone-unhandled-self-assignment 2019-05-12 12:23:56 +00:00
cert [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
cppcoreguidelines [clang-tidy] Don't issue cppcoreguidelines-macro-usage on builtin macros 2019-04-17 22:35:36 +00:00
fuchsia [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
google [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
hicpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check' 2019-05-10 18:27:09 +00:00
misc [clang-tidy] Add fix descriptions to clang-tidy checks. 2019-04-17 12:53:59 +00:00
modernize Removing an unused member variable; NFC. 2019-05-10 18:29:10 +00:00
mpi [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
objc [clang-tidy] Add a check for [super self] in initializers 🔍 2019-04-17 22:29:06 +00:00
openmp [clang-tidy] openmp-exception-escape check: point to the structured-block 2019-05-05 21:26:32 +00:00
performance [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
plugin [clang-tidy] A new OpenMP module 2019-03-22 19:46:01 +00:00
portability [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
readability Fixed: Duck-typing in readability-redundant-smartptr-get didn't catch MSVC STL smart pointers. 2019-05-02 16:41:28 +00:00
tool ClangTidy: Avoid mixing stdout with stderror when dealing with a large number of files. 2019-04-09 11:17:02 +00:00
utils [clang-tidy] openmp-exception-escape - a new check 2019-03-22 19:46:25 +00:00
zircon [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
CMakeLists.txt [clang-tidy] Separate the check-facing interface 2019-03-25 12:36:30 +00:00
ClangTidy.cpp [clang-tidy] Address post-commit comments 2019-04-18 14:18:14 +00:00
ClangTidy.h [clang-tidy] Separate the check-facing interface 2019-03-25 12:36:30 +00:00
ClangTidyCheck.cpp [clang-tidy] Separate the check-facing interface 2019-03-25 12:36:30 +00:00
ClangTidyCheck.h [clang-tidy] Remove the old ClangTidyCheck::registerPPCallbacks method 2019-04-03 14:03:43 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Add fix descriptions to clang-tidy checks. 2019-04-17 12:53:59 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] NOLINT support for "clang-diagnostic-*". 2019-03-12 16:11:46 +00:00
ClangTidyForceLinker.h [clang-tidy] A new OpenMP module 2019-03-22 19:46:01 +00:00
ClangTidyModule.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModule.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModuleRegistry.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyProfiling.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyProfiling.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ExpandModularHeadersPPCallbacks.cpp [clang-tidy] Fix a compiler warning. 2019-03-22 15:07:18 +00:00
ExpandModularHeadersPPCallbacks.h [clang-tidy] Fix a compiler warning. 2019-03-22 15:07:18 +00:00
add_new_check.py [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check' 2019-05-10 18:27:09 +00:00
rename_check.py [clang-tidy] Change the namespace for llvm checkers from 'llvm' to 'llvm_check' 2019-05-10 18:27:09 +00:00