diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-11 17:14:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-06-11 17:14:27 +0000 |
commit | 27f45236005d9dd2bbbfeb1682eb349cb8b6998b (patch) | |
tree | 4df5483830fd15094e066ebe7b2fa372007eb3db | |
parent | 0833f1f55b216e7467cb713106f1b6aa26100923 (diff) |
Add code completetion code for the new 'atomic' attribute
keyword in objc property decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132877 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 2 | ||||
-rw-r--r-- | test/Index/complete-property-flags.m | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 0b6cf87de5..e328eeb0aa 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -4165,6 +4165,8 @@ void Sema::CodeCompleteObjCPropertyFlags(Scope *S, ObjCDeclSpec &ODS) { 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"); diff --git a/test/Index/complete-property-flags.m b/test/Index/complete-property-flags.m index cd3696f11c..af9e214a29 100644 --- a/test/Index/complete-property-flags.m +++ b/test/Index/complete-property-flags.m @@ -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} |