diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-07 09:51:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-07 09:51:25 +0000 |
commit | 9a0c85e640a08174569a303db22981612f05d385 (patch) | |
tree | 3f0990a21f4df96d16611f7b61f7c9cfe10f2b1d /test/Index/complete-at-exprstmt.m | |
parent | c464ae8444edb6d07ea49b7a0eae1674c0fa1bb8 (diff) |
Code completion for Objective-C @ keywords that are statements or expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/complete-at-exprstmt.m')
-rw-r--r-- | test/Index/complete-at-exprstmt.m | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Index/complete-at-exprstmt.m b/test/Index/complete-at-exprstmt.m new file mode 100644 index 0000000000..82c3983e82 --- /dev/null +++ b/test/Index/complete-at-exprstmt.m @@ -0,0 +1,23 @@ +/* The run lines are below, because this test is line- and + column-number sensitive. */ +@interface MyClass { } +- (int)myMethod:(int)arg; +@end + +@implementation MyClass +- (int)myMethod:(int)arg { + @synchronized (@encode(MyClass)) { } +} +@end +// RUN: c-index-test -code-completion-at=%s:9:4 %s | FileCheck -check-prefix=CHECK-CC1 %s +// CHECK-CC1: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )} +// CHECK-CC1: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )} +// CHECK-CC1: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )} +// CHECK-CC1: {TypedText synchronized}{Text }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }} +// CHECK-CC1: {TypedText throw}{Text }{Placeholder expression}{Text ;} +// CHECK-CC1: {TypedText try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }} +// RUN: c-index-test -code-completion-at=%s:9:19 %s | FileCheck -check-prefix=CHECK-CC2 %s +// CHECK-CC2: {TypedText encode}{LeftParen (}{Placeholder type-name}{RightParen )} +// CHECK-CC2: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )} +// CHECK-CC2: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )} + |