History log of /llvm-project/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp (Results 26 – 50 of 76)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1
# 4fba10c3 16-Oct-2016 Devin Coughlin <dcoughlin@apple.com>

Revert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker""

Revert:
r283662: [analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"
r283660: [analyzer] Fix build error

Revert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker""

Revert:
r283662: [analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"
r283660: [analyzer] Fix build error after r283660 - remove constexpr strings.

It was causing an internal build bot to fail. It looks like in some cases
adding an extra note can cause scan-build plist output to drop a diagnostic
altogether.

llvm-svn: 284317

show more ...


# 0bd37a1a 12-Oct-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS

On macOS (but not iOS), if an ObjC property has no setter, the nib-loading code
for an IBOutlet is documented as dire

[analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS

On macOS (but not iOS), if an ObjC property has no setter, the nib-loading code
for an IBOutlet is documented as directly setting the backing ivar without
retaining the value -- even if the property is 'retain'.

This resulted in false positives from the DeallocChecker for code that did not
release such ivars in -dealloc.

To avoid these false positives, treat IBOutlet ivars that back a property
without a setter as having an unknown release requirement in macOS.

rdar://problem/28507353

llvm-svn: 284084

show more ...


# 83ebea4c 08-Oct-2016 Artem Dergachev <artem.dergachev@gmail.com>

[analyzer] Fix build error after r283660 - remove constexpr strings.

llvm-svn: 283662


# 46209e1d 08-Oct-2016 Artem Dergachev <artem.dergachev@gmail.com>

[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"

The parent commit (r283092) was reverted before and now finally landed.

llvm-svn: 283660


# b3814f6f 04-Oct-2016 Vitaly Buka <vitalybuka@google.com>

Revert "[analyzer] Add extra notes to ObjCDeallocChecker" as its depends on reverted r283092

This reverts commit r283093.

llvm-svn: 283181


# 918602df 03-Oct-2016 Artem Dergachev <artem.dergachev@gmail.com>

[analyzer] Add extra notes to ObjCDeallocChecker

The report is now highlighting instance variables and properties
referenced by the warning message with the help of the
extra notes feature recently

[analyzer] Add extra notes to ObjCDeallocChecker

The report is now highlighting instance variables and properties
referenced by the warning message with the help of the
extra notes feature recently introduced in r283092.

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

llvm-svn: 283093

show more ...


Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1
# 5ed2b4ba 28-Jul-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Fix misleading indentation in ObjCDeallocChecker. NFC.

llvm-svn: 277009


# 50aece03 13-Jul-2016 Artem Dergachev <artem.dergachev@gmail.com>

[analyzer] Implement a methond to discover origin region of a symbol.

This encourages checkers to make logical decisions depending on
value of which region was the symbol under consideration
introdu

[analyzer] Implement a methond to discover origin region of a symbol.

This encourages checkers to make logical decisions depending on
value of which region was the symbol under consideration
introduced to denote.

A similar technique is already used in a couple of checkers;
they were modified to call the new method.

Differential Revision: http://reviews.llvm.org/D22242

llvm-svn: 275290

show more ...


# 9d5057cc 22-Jun-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Teach ObjCDeallocChecker about XCTestCase

Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to
release instance variables and so typically do not release ivars in

[analyzer] Teach ObjCDeallocChecker about XCTestCase

Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to
release instance variables and so typically do not release ivars in -dealloc.
This commit applies the existing special casing for SenTestCase to XCTestCase
as well.

rdar://problem/25884696

llvm-svn: 273441

show more ...


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# b8076292 25-Mar-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Add CIFIlter modeling to DeallocChecker.

The -dealloc method in CIFilter is highly unusual in that it will release
instance variables belonging to its *subclasses* if the variable name
st

[analyzer] Add CIFIlter modeling to DeallocChecker.

The -dealloc method in CIFilter is highly unusual in that it will release
instance variables belonging to its *subclasses* if the variable name
starts with "input" or backs a property whose name starts with "input".
Subclasses should not release these ivars in their own -dealloc method --
doing so could result in an over release.

Before this commit, the DeallocChecker would warn about missing releases for
such "input" properties -- which could cause users of the analyzer to add
over releases to silence the warning.

To avoid this, DeallocChecker now treats CIFilter "input-prefixed" ivars
as MustNotReleaseDirectly and so will not require a release. Further, it
will now warn when such an ivar is directly released in -dealloc.

rdar://problem/25364901

llvm-svn: 264463

show more ...


# a6046798 04-Mar-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.

In dealloc methods, the analyzer now warns when -dealloc is called directly on
a synthesized retain/copy ivar

[analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.

In dealloc methods, the analyzer now warns when -dealloc is called directly on
a synthesized retain/copy ivar instead of -release. This is intended to find mistakes of
the form:

- (void)dealloc {
[_ivar dealloc]; // Mistaken call to -dealloc instead of -release

[super dealloc];
}

rdar://problem/16227989

llvm-svn: 262729

show more ...


# 578a20a8 03-Mar-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] ObjCDeallocChecker: Only check for nil-out when type is retainable.

This fixes a crash when setting a property of struct type in -dealloc.

llvm-svn: 262659


Revision tags: llvmorg-3.8.0
# 6d0c8a03 01-Mar-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Update CheckObjCDealloc diagnostic for missing -dealloc.

Update the diagnostic for classes missing -dealloc to mention an instance
variable that needs to be released.

llvm-svn: 262277


# 09359493 29-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Teach CheckObjCDealloc about Block_release().

It now treats Block_release(b) as a release in addition to [b release].

llvm-svn: 262272


# 3fc67e47 29-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc.

This prevents false negatives when a -dealloc method, for example, removes itself as
as an observer with [[NSNotificat

[analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc.

This prevents false negatives when a -dealloc method, for example, removes itself as
as an observer with [[NSNotificationCenter defaultCenter] removeObserver:self]. It is
unlikely that passing 'self' to a system header method will release 'self''s instance
variables, so this is unlikely to produce false positives.

A challenge here is that while CheckObjCDealloc no longer treats these calls as
escaping, the rest of the analyzer still does. In particular, this means that loads
from the same instance variable before and after a call to a system header will
result in different symbols being loaded by the region store. To account for this,
the checker now treats different ivar symbols with the same instance and ivar decl as
the same for the purpose of release checking and more eagerly removes a release
requirement when an instance variable is assumed to be nil. This was not needed before
because when an ivar escaped its release requirement was always removed -- now the
requirement is not removed for calls to system headers.

llvm-svn: 262261

show more ...


# ec6f61cc 26-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Prune some incorrect \param doc comment annotations.

llvm-svn: 261970


# a8aa5f0a 26-Feb-2016 NAKAMURA Takumi <geek4civic@gmail.com>

Checkers/CheckObjCDealloc.cpp: Prune "\param". [-Wdocumentation]

llvm-svn: 261963


# ad9f53e9 25-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Reapply r261917 with a fix.

This reapplies "[analyzer] Make ObjCDeallocChecker path sensitive." (r261917)
with a fix for an error on some bots about specializing a template
from another n

[analyzer] Reapply r261917 with a fix.

This reapplies "[analyzer] Make ObjCDeallocChecker path sensitive." (r261917)
with a fix for an error on some bots about specializing a template
from another namespace.

llvm-svn: 261929

show more ...


# ea02bba5 25-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

Revert "[analyzer] Make ObjCDeallocChecker path sensitive."

This reverts commit r261917. It broke the bots.

llvm-svn: 261921


# 88691c1f 25-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Make ObjCDeallocChecker path sensitive.

Convert the ObjCDeallocChecker to be path sensitive. The primary
motivation for this change is to prevent false positives when -dealloc calls
helpe

[analyzer] Make ObjCDeallocChecker path sensitive.

Convert the ObjCDeallocChecker to be path sensitive. The primary
motivation for this change is to prevent false positives when -dealloc calls
helper invalidation methods to release instance variables, but it additionally
improves precision when -dealloc contains control flow. It also reduces the need
for pattern matching. The check for missing -dealloc methods remains AST-based.

Part of rdar://problem/6927496

Differential Revision: http://reviews.llvm.org/D17511

llvm-svn: 261917

show more ...


Revision tags: llvmorg-3.8.0-rc3
# 982c42da 11-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] Improve pattern matching in ObjCDealloc checker.

Look through PseudoObjectExpr and OpaqueValueExprs when scanning for
release-like operations. This commit also adds additional tests in an

[analyzer] Improve pattern matching in ObjCDealloc checker.

Look through PseudoObjectExpr and OpaqueValueExprs when scanning for
release-like operations. This commit also adds additional tests in anticipation
of re-writing this as a path-sensitive checker.

llvm-svn: 260608

show more ...


# 38e0e297 06-Feb-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] DeallocChecker: Don't warn on release of readonly assign property in dealloc.

It is common for the ivars for read-only assign properties to always be stored retained,
so don't warn for a

[analyzer] DeallocChecker: Don't warn on release of readonly assign property in dealloc.

It is common for the ivars for read-only assign properties to always be stored retained,
so don't warn for a release in dealloc for the ivar backing these properties.

llvm-svn: 259998

show more ...


Revision tags: llvmorg-3.8.0-rc2
# 30751347 27-Jan-2016 Devin Coughlin <dcoughlin@apple.com>

[analyzer] ObjCDeallocChecker: Only operate on classes with retained properties.

Previously the ObjC Dealloc Checker only checked classes with ivars, not
retained properties, which caused three bugs

[analyzer] ObjCDeallocChecker: Only operate on classes with retained properties.

Previously the ObjC Dealloc Checker only checked classes with ivars, not
retained properties, which caused three bugs:

- False positive warnings about a missing -dealloc method in classes with only
ivars.
- Missing warnings about a missing -dealloc method on classes with only
properties.
- Missing warnings about an over-released or under-released ivar associated with
a retained property in classes with only properties.

The fix is to check only classes with at least one retained synthesized
property.

This also exposed a bug when reporting an over-released or under-released
property that did not contain a synthesize statement. The checker tried to
associate the warning with an @synthesize statement that did not exist, which
caused an assertion failure in debug builds. The fix is to fall back to the
@property statement in this case.

A patch by David Kilzer!

Part of rdar://problem/6927496

Differential Revision: http://reviews.llvm.org/D5023

llvm-svn: 258896

show more ...


Revision tags: llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# 3a0678e3 08-Sep-2015 Ted Kremenek <kremenek@apple.com>

[analyzer] Apply whitespace cleanups by Honggyu Kim.

llvm-svn: 246978


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1
# 973431b2 03-Jul-2015 Benjamin Kramer <benny.kra@googlemail.com>

Rewrite users of Stmt::child_begin/end into for-range loops.

No functionality change intended.

llvm-svn: 241355


1234