[cfe-commits] r132877 - in /cfe/trunk: lib/Sema/SemaCodeComplete.cpp test/Index/complete-property-flags.m

Fariborz Jahanian fjahanian at apple.com
Sat Jun 11 10:14:27 PDT 2011


Author: fjahanian
Date: Sat Jun 11 12:14:27 2011
New Revision: 132877

URL: http://llvm.org/viewvc/llvm-project?rev=132877&view=rev
Log:
Add code completetion code for the new 'atomic' attribute
keyword in objc property decl.


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=132877&r1=132876&r2=132877&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Sat Jun 11 12:14:27 2011
@@ -4165,6 +4165,8 @@
     Results.AddResult(CodeCompletionResult("copy"));
   if (!ObjCPropertyFlagConflicts(Attributes, ObjCDeclSpec::DQ_PR_nonatomic))
     Results.AddResult(CodeCompletionResult("nonatomic"));
+  if (!ObjCPropertyFlagConflicts(Attributes, ObjCDeclSpec::DQ_PR_atomic))
+    Results.AddResult(CodeCompletionResult("atomic"));
   if (!ObjCPropertyFlagConflicts(Attributes, ObjCDeclSpec::DQ_PR_setter)) {
     CodeCompletionBuilder Setter(Results.getAllocator());
     Setter.AddTypedTextChunk("setter");

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=132877&r1=132876&r2=132877&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-property-flags.m (original)
+++ cfe/trunk/test/Index/complete-property-flags.m Sat Jun 11 12:14:27 2011
@@ -8,6 +8,7 @@
 @property(retain, nonatomic) id xx;
 // RUN: c-index-test -code-completion-at=%s:7:11 %s | FileCheck -check-prefix=CHECK-CC1 %s
 // 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 nonatomic}





More information about the cfe-commits mailing list