r201765 - [code-completion] Style guideline for Cocoa has custom accessor in property declarations without spaces around '='.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Feb 19 23:55:16 PST 2014
Author: akirtzidis
Date: Thu Feb 20 01:55:15 2014
New Revision: 201765
URL: http://llvm.org/viewvc/llvm-project?rev=201765&view=rev
Log:
[code-completion] Style guideline for Cocoa has custom accessor in property declarations without spaces around '='.
rdar://16059171
Modified:
cfe/trunk/lib/Sema/SemaCodeComplete.cpp
cfe/trunk/test/Index/complete-property-flags.m
Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=201765&r1=201764&r2=201765&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Thu Feb 20 01:55:15 2014
@@ -4752,7 +4752,7 @@ void Sema::CodeCompleteObjCPropertyFlags
CodeCompletionBuilder Setter(Results.getAllocator(),
Results.getCodeCompletionTUInfo());
Setter.AddTypedTextChunk("setter");
- Setter.AddTextChunk(" = ");
+ Setter.AddTextChunk("=");
Setter.AddPlaceholderChunk("method");
Results.AddResult(CodeCompletionResult(Setter.TakeString()));
}
@@ -4760,7 +4760,7 @@ void Sema::CodeCompleteObjCPropertyFlags
CodeCompletionBuilder Getter(Results.getAllocator(),
Results.getCodeCompletionTUInfo());
Getter.AddTypedTextChunk("getter");
- Getter.AddTextChunk(" = ");
+ Getter.AddTextChunk("=");
Getter.AddPlaceholderChunk("method");
Results.AddResult(CodeCompletionResult(Getter.TakeString()));
}
Modified: cfe/trunk/test/Index/complete-property-flags.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/complete-property-flags.m?rev=201765&r1=201764&r2=201765&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-property-flags.m (original)
+++ cfe/trunk/test/Index/complete-property-flags.m Thu Feb 20 01:55:15 2014
@@ -11,12 +11,12 @@
// CHECK-CC1: {TypedText assign}
// CHECK-CC1-NEXT: {TypedText atomic}
// CHECK-CC1-NEXT: {TypedText copy}
-// CHECK-CC1-NEXT: {TypedText getter}{Text = }{Placeholder method}
+// CHECK-CC1-NEXT: {TypedText getter}{Text =}{Placeholder method}
// CHECK-CC1-NEXT: {TypedText nonatomic}
// CHECK-CC1-NEXT: {TypedText readonly}
// CHECK-CC1-NEXT: {TypedText readwrite}
// CHECK-CC1-NEXT: {TypedText retain}
-// CHECK-CC1-NEXT: {TypedText setter}{Text = }{Placeholder method}
+// CHECK-CC1-NEXT: {TypedText setter}{Text =}{Placeholder method}
// CHECK-CC1-NEXT: {TypedText strong}
// CHECK-CC1-NEXT: {TypedText unsafe_unretained}
// CHECK-CC1-NOT: {TypedText weak}
@@ -25,20 +25,20 @@
// CHECK-CC1-ARC: {TypedText assign}
// CHECK-CC1-ARC-NEXT: {TypedText atomic}
// CHECK-CC1-ARC-NEXT: {TypedText copy}
-// CHECK-CC1-ARC-NEXT: {TypedText getter}{Text = }{Placeholder method}
+// CHECK-CC1-ARC-NEXT: {TypedText getter}{Text =}{Placeholder method}
// CHECK-CC1-ARC-NEXT: {TypedText nonatomic}
// CHECK-CC1-ARC-NEXT: {TypedText readonly}
// CHECK-CC1-ARC-NEXT: {TypedText readwrite}
// CHECK-CC1-ARC-NEXT: {TypedText retain}
-// CHECK-CC1-ARC-NEXT: {TypedText setter}{Text = }{Placeholder method}
+// CHECK-CC1-ARC-NEXT: {TypedText setter}{Text =}{Placeholder method}
// CHECK-CC1-ARC-NEXT: {TypedText strong}
// CHECK-CC1-ARC-NEXT: {TypedText unsafe_unretained}
// CHECK-CC1-ARC-NEXT: {TypedText weak}
// RUN: c-index-test -code-completion-at=%s:8:18 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: {TypedText getter}{Text = }{Placeholder method}
+// CHECK-CC2: {TypedText getter}{Text =}{Placeholder method}
// CHECK-CC2-NEXT: {TypedText nonatomic}
// CHECK-CC2-NEXT: {TypedText readonly}
// CHECK-CC2-NEXT: {TypedText readwrite}
-// CHECK-CC2-NEXT: {TypedText setter}{Text = }{Placeholder method}
+// CHECK-CC2-NEXT: {TypedText setter}{Text =}{Placeholder method}
@end
More information about the cfe-commits
mailing list