diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-01-31 05:03:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-01-31 05:03:46 +0000 |
commit | 52e0de4c6e3644fb8b2e02aced03c6731452591f (patch) | |
tree | 50104a83feaa1df3bf5a86864dbd8b7d064e6bdc /clang/test/Index/complete-stmt.c | |
parent | 0a0e2b3631a1c95c280f20d839e82eb9a7647b09 (diff) | |
download | bcm5719-llvm-52e0de4c6e3644fb8b2e02aced03c6731452591f.tar.gz bcm5719-llvm-52e0de4c6e3644fb8b2e02aced03c6731452591f.zip |
When code completing in a statement, parenthesized expression, or
Objective-C message receiver, the user is as likely to want to write a
type name as any other declaration, so give types the same priority as
other declarations. Fixes <rdar://problem/12480600>.
llvm-svn: 174038
Diffstat (limited to 'clang/test/Index/complete-stmt.c')
-rw-r--r-- | clang/test/Index/complete-stmt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/Index/complete-stmt.c b/clang/test/Index/complete-stmt.c index e39431ebdcc..3d31ca2f908 100644 --- a/clang/test/Index/complete-stmt.c +++ b/clang/test/Index/complete-stmt.c @@ -1,7 +1,7 @@ // Note: the run lines follow their respective tests, since line/column // matter in this test. - +typedef int Integer; void f(int x) { if (x) { } @@ -14,3 +14,12 @@ void f(int x) { // RUN: c-index-test -code-completion-at=%s:7:4 %s | FileCheck -check-prefix=CHECK-IF-ELSE-SIMPLE %s // CHECK-IF-ELSE-SIMPLE: NotImplemented:{TypedText else} (40) // CHECK-IF-ELSE-SIMPLE: NotImplemented:{TypedText else}{HorizontalSpace }{Text if}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )} (40) + +// RUN: c-index-test -code-completion-at=%s:6:1 %s | FileCheck -check-prefix=CHECK-STMT %s +// CHECK-STMT: NotImplemented:{TypedText char} (50) +// CHECK-STMT: NotImplemented:{TypedText const} (50) +// CHECK-STMT: NotImplemented:{TypedText double} (50) +// CHECK-STMT: NotImplemented:{TypedText enum} (50) +// CHECK-STMT: FunctionDecl:{ResultType void}{TypedText f}{LeftParen (}{Placeholder int x}{RightParen )} (50) +// CHECK-STMT: TypedefDecl:{TypedText Integer} (50) +// CHECK-STMT: ParmDecl:{ResultType int}{TypedText x} (34) |