aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-07-18 17:23:30 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-07-18 17:23:30 +0000
commiteea0737a34674c3e19ed88447fdd0e5a310ac17b (patch)
tree45beac6e0a411da314c1bb16a8e0e6efdbc1be1e /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent816739ca825f34357abd1ec2834e10d66d929ff1 (diff)
downloadllvm-eea0737a34674c3e19ed88447fdd0e5a310ac17b.zip
llvm-eea0737a34674c3e19ed88447fdd0e5a310ac17b.tar.gz
llvm-eea0737a34674c3e19ed88447fdd0e5a310ac17b.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions