]> granicus.if.org Git - clang/commitdiff
[analyzer] Fix capitalization in ObjCSuperDealloc checker diagnostic.
authorDevin Coughlin <dcoughlin@apple.com>
Tue, 1 Nov 2016 22:16:39 +0000 (22:16 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Tue, 1 Nov 2016 22:16:39 +0000 (22:16 +0000)
Change "use of 'self'..." to "Use of 'self'...". The convention is to
start diagnostics with a capital letter.

rdar://problem/28322494

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285759 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp
test/Analysis/DeallocUseAfterFreeErrors.m

index 15980c5c538704a8ddc2f2b0128d984890c3d3ac..e75d20897710a4dfb15c163560092ffe34d49549 100644 (file)
@@ -191,7 +191,7 @@ void ObjCSuperDeallocChecker::reportUseAfterDealloc(SymbolRef Sym,
     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(
index 4a77c070b1bf3af2af3fd059f892448dfee889fa..c131e71f44a1bbd76288d82d0b2d2e409f1e4f05 100644 (file)
@@ -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