Author: dcoughlin Date: Tue Nov 1 17:16:39 2016 New Revision: 285759 URL: http://llvm.org/viewvc/llvm-project?rev=285759&view=rev Log: [analyzer] Fix capitalization in ObjCSuperDealloc checker diagnostic.
Change "use of 'self'..." to "Use of 'self'...". The convention is to start diagnostics with a capital letter. rdar://problem/28322494 Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp cfe/trunk/test/Analysis/DeallocUseAfterFreeErrors.m Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp?rev=285759&r1=285758&r2=285759&view=diff ============================================================================== --- cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp (original) +++ cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp Tue Nov 1 17:16:39 2016 @@ -191,7 +191,7 @@ void ObjCSuperDeallocChecker::reportUseA return; if (Desc.empty()) - Desc = "use of 'self' after it has been deallocated"; + Desc = "Use of 'self' after it has been deallocated"; // Generate the report. std::unique_ptr<BugReport> BR( Modified: cfe/trunk/test/Analysis/DeallocUseAfterFreeErrors.m URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/DeallocUseAfterFreeErrors.m?rev=285759&r1=285758&r2=285759&view=diff ============================================================================== --- cfe/trunk/test/Analysis/DeallocUseAfterFreeErrors.m (original) +++ cfe/trunk/test/Analysis/DeallocUseAfterFreeErrors.m Tue Nov 1 17:16:39 2016 @@ -125,8 +125,8 @@ struct SomeStruct { } - (void)dealloc { [super dealloc]; // expected-note {{[super dealloc] called here}} - self.ivar = nil; // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + self.ivar = nil; // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} } @end @@ -144,8 +144,8 @@ struct SomeStruct { } - (void)dealloc { [super dealloc]; // expected-note {{[super dealloc] called here}} - self.delegate = nil; // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + self.delegate = nil; // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} } @end @@ -158,8 +158,8 @@ struct SomeStruct { } - (void)dealloc { [super dealloc]; // expected-note {{[super dealloc] called here}} - [self _invalidate]; // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + [self _invalidate]; // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} } @end @@ -173,8 +173,8 @@ static void _invalidate(NSObject *object @implementation SuperDeallocThenCallNonObjectiveCMethodClass - (void)dealloc { [super dealloc]; // expected-note {{[super dealloc] called here}} - _invalidate(self); // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + _invalidate(self); // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} } @end @@ -187,8 +187,8 @@ static void _invalidate(NSObject *object - (void)dealloc { [super dealloc]; // expected-note {{[super dealloc] called here}} - [SuperDeallocThenCallObjectiveClassMethodClass invalidate:self]; // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + [SuperDeallocThenCallObjectiveClassMethodClass invalidate:self]; // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} } @end @@ -208,8 +208,8 @@ static void _invalidate(NSObject *object return; } [super dealloc]; // expected-note {{[super dealloc] called here}} - [self _invalidate]; // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + [self _invalidate]; // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} } @end @@ -366,8 +366,8 @@ static void _invalidate(NSObject *object - (void)dealloc; { [super dealloc]; // expected-note {{[super dealloc] called here}} - [self anotherMethod]; // expected-warning {{use of 'self' after it has been deallocated}} - // expected-note@-1 {{use of 'self' after it has been deallocated}} + [self anotherMethod]; // expected-warning {{Use of 'self' after it has been deallocated}} + // expected-note@-1 {{Use of 'self' after it has been deallocated}} [super dealloc]; } @end _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits