aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDisassembler/Disassembler.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2015-03-30 20:18:00 +0000
committerJordan Rose <jordan_rose@apple.com>2015-03-30 20:18:00 +0000
commit3da3f8e045c667059f6d2bef92de35809752f960 (patch)
tree64be81fcd08f46a78db4e299e0720052ba839d79 /llvm/lib/MC/MCDisassembler/Disassembler.cpp
parent218772f87ef53d1db4f03f4bd131482bdcc1089c (diff)
downloadllvm-3da3f8e045c667059f6d2bef92de35809752f960.zip
llvm-3da3f8e045c667059f6d2bef92de35809752f960.tar.gz
llvm-3da3f8e045c667059f6d2bef92de35809752f960.tar.bz2
[analyzer] Disable all retain count diagnostics on values that come from ivars.
This is imitating a pre-r228174 state where ivars are not considered tracked by default, but with the addition that even ivars /with/ retain count information (e.g. "[_ivar retain]; [ivar _release];") are not being tracked as well. This is to ensure that we don't regress on values accessed through both properties and ivars, which is what r228174 was trying to fix. The issue occurs in code like this: [_contentView retain]; [_contentView removeFromSuperview]; [self addSubview:_contentView]; // invalidates 'self' [_contentView release]; In this case, the call to -addSubview: may change the value of self->_contentView, and so the analyzer can't be sure that we didn't leak the original _contentView. This is a correct conservative view of the world, but not a useful one. Until we have a heuristic that allows us to not consider this a leak, not emitting a diagnostic is our best bet. This commit disables all of the ivar-related retain count tests, but does not remove them to ensure that we don't crash trying to evaluate either valid or erroneous code. The next commit will add a new test for the example above so that this commit (and the previous one) can be reverted wholesale when a better solution is implemented. Rest of rdar://problem/20335433 llvm-svn: 233592
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/Disassembler.cpp')
0 files changed, 0 insertions, 0 deletions