hanchenye-llvm-project/clang/lib
Devin Coughlin eea0737a34 [analyzer] Add checker modeling potential C++ self-assignment
This checker checks copy and move assignment operators whether they are
protected against self-assignment. Since C++ core guidelines discourages
explicit checking for `&rhs==this` in general we take a different approach: in
top-frame analysis we branch the exploded graph for two cases, where &rhs==this
and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the
work. It is important that we check all copy and move assignment operator in top
frame even if we checked them already since self-assignments may happen
undetected even in the same translation unit (e.g. using random indices for an
array what may or may not be the same).

A patch by Ádám Balogh!

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

llvm-svn: 275820
2016-07-18 17:23:30 +00:00
..
ARCMigrate [objcmt] Fix a buffer overflow crash than can occur while modernizing enums. 2016-07-15 19:22:34 +00:00
AST [ObjC] Implement @available in the Parser and AST 2016-07-16 00:35:23 +00:00
ASTMatchers [ASTMatchers] isSignedInteger() and isUnsignedInteger() 2016-07-12 06:36:00 +00:00
Analysis P0305R0: Semantic analysis and code generation for C++17 init-statement for 'if' and 'switch': 2016-07-14 00:11:03 +00:00
Basic [OpenMP] Sema and parsing for 'target parallel for simd' pragma 2016-07-14 02:54:56 +00:00
CodeGen CodeGen: honour dllstorage on ObjC types 2016-07-17 22:27:44 +00:00
Driver [Driver] Add flags for enabling both types of PGO Instrumentation 2016-07-16 02:54:58 +00:00
Edit Remove autoconf support 2016-01-26 21:30:40 +00:00
Format clang-format: [JS] Allow top-level conditionals again. 2016-07-12 15:45:53 +00:00
Frontend Attempt to work around MSVC rejects-valid, round 2. 2016-07-17 20:00:59 +00:00
FrontendTool Make it possible for AST plugins to enable themselves by default 2016-03-15 12:51:40 +00:00
Headers [X86][AVX512F] minor fix of the parameter names 2016-07-14 08:40:30 +00:00
Index [index] Create different USR if a property is a class property. 2016-07-15 22:18:19 +00:00
Lex [Lex] Speed up updateConsecutiveMacroArgTokens (NFC) 2016-07-07 22:38:29 +00:00
Parse [ObjC] Implement @available in the Parser and AST 2016-07-16 00:35:23 +00:00
Rewrite Remove use of builtin comma operator. 2016-02-18 22:34:54 +00:00
Sema [ObjC] Implement @available in the Parser and AST 2016-07-16 00:35:23 +00:00
Serialization [ObjC] Implement @available in the Parser and AST 2016-07-16 00:35:23 +00:00
StaticAnalyzer [analyzer] Add checker modeling potential C++ self-assignment 2016-07-18 17:23:30 +00:00
Tooling Make tooling::applyAllReplacements return llvm::Expected<string> instead of empty string to indicate potential error. 2016-07-11 13:53:12 +00:00
CMakeLists.txt