Skip to content

Commit

Permalink
[analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262520 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
devincoughlin committed Mar 2, 2016
1 parent d18307b commit fbec52f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void ObjCSuperDeallocChecker::checkLocation(SVal L, bool IsLoad, const Stmt *S,
std::string Buf;
llvm::raw_string_ostream OS(Buf);
if (IvarRegion) {
OS << "use of instance variable '" << *IvarRegion->getDecl() <<
OS << "Use of instance variable '" << *IvarRegion->getDecl() <<
"' after 'self' has been deallocated";
Desc = OS.str();
}
Expand Down
20 changes: 10 additions & 10 deletions test/Analysis/DeallocUseAfterFreeErrors.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ - (instancetype)initWithIvar:(NSObject *)ivar {
}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
[_ivar release]; // expected-warning {{use of instance variable '_ivar' after 'self' has been deallocated}}
// expected-note@-1 {{use of instance variable '_ivar' after 'self' has been deallocated}}
[_ivar release]; // expected-warning {{Use of instance variable '_ivar' after 'self' has been deallocated}}
// expected-note@-1 {{Use of instance variable '_ivar' after 'self' has been deallocated}}
}
@end

Expand All @@ -56,8 +56,8 @@ - (instancetype)initWithDelegate:(NSObject *)delegate {
}
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
_delegate = nil; // expected-warning {{use of instance variable '_delegate' after 'self' has been deallocated}}
// expected-note@-1 {{use of instance variable '_delegate' after 'self' has been deallocated}}
_delegate = nil; // expected-warning {{Use of instance variable '_delegate' after 'self' has been deallocated}}
// expected-note@-1 {{Use of instance variable '_delegate' after 'self' has been deallocated}}
}
@end

Expand All @@ -74,8 +74,8 @@ @interface SuperDeallocThenAssignIvarField : NSObject {
@implementation SuperDeallocThenAssignIvarField
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
_s.f = 7; // expected-warning {{use of instance variable '_s' after 'self' has been deallocated}}
// expected-note@-1 {{use of instance variable '_s' after 'self' has been deallocated}}
_s.f = 7; // expected-warning {{Use of instance variable '_s' after 'self' has been deallocated}}
// expected-note@-1 {{Use of instance variable '_s' after 'self' has been deallocated}}
}
@end

Expand All @@ -93,8 +93,8 @@ @interface SuperDeallocThenAssignIvarIvar : NSObject {
@implementation SuperDeallocThenAssignIvarIvar
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
_ivar->_otherIvar = 7; // expected-warning {{use of instance variable '_ivar' after 'self' has been deallocated}}
// expected-note@-1 {{use of instance variable '_ivar' after 'self' has been deallocated}}
_ivar->_otherIvar = 7; // expected-warning {{Use of instance variable '_ivar' after 'self' has been deallocated}}
// expected-note@-1 {{Use of instance variable '_ivar' after 'self' has been deallocated}}
}
@end

Expand All @@ -106,8 +106,8 @@ @interface SuperDeallocThenAssignSelfIvar : NSObject {
@implementation SuperDeallocThenAssignSelfIvar
- (void)dealloc {
[super dealloc]; // expected-note {{[super dealloc] called here}}
self->_ivar = nil; // expected-warning {{use of instance variable '_ivar' after 'self' has been deallocated}}
// expected-note@-1 {{use of instance variable '_ivar' after 'self' has been deallocated}}
self->_ivar = nil; // expected-warning {{Use of instance variable '_ivar' after 'self' has been deallocated}}
// expected-note@-1 {{Use of instance variable '_ivar' after 'self' has been deallocated}}
}
@end

Expand Down

0 comments on commit fbec52f

Please sign in to comment.