diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-05-25 21:41:55 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-05-25 21:41:55 +0000 |
| commit | f64acca2f50bc4fbe8e2740ca7980b7700f62b40 (patch) | |
| tree | 50fb6736db8c45255bfe9140795fe1236f411288 /clang/test | |
| parent | 19a4b843cc81c15c3acaf44fe42e74d1add7a634 (diff) | |
| download | bcm5719-llvm-f64acca2f50bc4fbe8e2740ca7980b7700f62b40.tar.gz bcm5719-llvm-f64acca2f50bc4fbe8e2740ca7980b7700f62b40.zip | |
Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.
llvm-svn: 104637
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeCompletion/call.c | 2 | ||||
| -rw-r--r-- | clang/test/CodeCompletion/call.cpp | 2 | ||||
| -rw-r--r-- | clang/test/CodeCompletion/ordinary-name.cpp | 8 | ||||
| -rw-r--r-- | clang/test/Index/complete-at-directives.m | 14 | ||||
| -rw-r--r-- | clang/test/Index/complete-at-exprstmt.m | 6 | ||||
| -rw-r--r-- | clang/test/Index/complete-exprs.c | 8 | ||||
| -rw-r--r-- | clang/test/Index/complete-recovery.m | 4 |
7 files changed, 22 insertions, 22 deletions
diff --git a/clang/test/CodeCompletion/call.c b/clang/test/CodeCompletion/call.c index 8210389ffa5..8581414bf8c 100644 --- a/clang/test/CodeCompletion/call.c +++ b/clang/test/CodeCompletion/call.c @@ -6,7 +6,7 @@ void test() { f0(0, 0); g0(0, 0); f1(0, 0); - // RUN: %clang_cc1 -std=c89 -fsyntax-only -code-completion-at=%s:6:6 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -std=c89 -fsyntax-only -code-completion-at=%s:6:6 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: f0(<#float x#>, float y) // RUN: %clang_cc1 -std=c89 -fsyntax-only -code-completion-at=%s:6:9 %s -o - | FileCheck -check-prefix=CC2 %s // CHECK-CC2: f0(float x, <#float y#>) diff --git a/clang/test/CodeCompletion/call.cpp b/clang/test/CodeCompletion/call.cpp index 1df958ed2cc..46494e7619f 100644 --- a/clang/test/CodeCompletion/call.cpp +++ b/clang/test/CodeCompletion/call.cpp @@ -17,7 +17,7 @@ void f(); void test() { f(Y(), 0, 0); - // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type-id#>>(<#expression#>) // CHECK-CC1: f(N::Y y, <#int ZZ#>) // CHECK-CC1-NEXT: f(int i, <#int j#>, int k) diff --git a/clang/test/CodeCompletion/ordinary-name.cpp b/clang/test/CodeCompletion/ordinary-name.cpp index 699b01de74f..20f661a2803 100644 --- a/clang/test/CodeCompletion/ordinary-name.cpp +++ b/clang/test/CodeCompletion/ordinary-name.cpp @@ -4,7 +4,7 @@ typedef struct t TYPEDEF; void foo() { int y = 17; - // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:6:14 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:6:14 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: COMPLETION: bool // CHECK-CC1-NEXT: COMPLETION: char // CHECK-CC1-NEXT: COMPLETION: class @@ -57,7 +57,7 @@ void foo() { // CHECK-CC1-NEXT: COMPLETION: y : [#int#]y // CHECK-CC1-NEXT: COMPLETION: z : [#void#]z(<#int#>) - // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:1 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:4:1 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: COMPLETION: Pattern : asm(<#string-literal#>) // CHECK-CC2-NEXT: COMPLETION: bool // CHECK-CC2-NEXT: COMPLETION: char @@ -93,7 +93,7 @@ void foo() { // CHECK-CC2-NEXT: COMPLETION: wchar_t // CHECK-CC2-NEXT: COMPLETION: X : X - // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:1:19 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:1:19 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s // CHECK-CC3: COMPLETION: bool // CHECK-CC3-NEXT: COMPLETION: char // CHECK-CC3-NEXT: COMPLETION: class @@ -129,7 +129,7 @@ void foo() { // CHECK-CC3-NEXT: COMPLETION: wchar_t // CHECK-CC3-NEXT: COMPLETION: X : X - // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:6:11 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s + // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:6:11 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s // CHECK-CC4: COMPLETION: bool // CHECK-CC4-NEXT: COMPLETION: char // CHECK-CC4-NEXT: COMPLETION: class diff --git a/clang/test/Index/complete-at-directives.m b/clang/test/Index/complete-at-directives.m index 811bca00efb..a278ce88366 100644 --- a/clang/test/Index/complete-at-directives.m +++ b/clang/test/Index/complete-at-directives.m @@ -5,25 +5,25 @@ @implementation MyClass @end -// RUN: c-index-test -code-completion-at=%s:2:2 %s | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:2:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: {TypedText class}{HorizontalSpace }{Placeholder identifier} // CHECK-CC1: {TypedText compatibility_alias}{HorizontalSpace }{Placeholder alias}{HorizontalSpace }{Placeholder class} // CHECK-CC1: {TypedText implementation}{HorizontalSpace }{Placeholder class} // CHECK-CC1: {TypedText interface}{HorizontalSpace }{Placeholder class} // CHECK-CC1: {TypedText protocol}{HorizontalSpace }{Placeholder protocol} -// RUN: c-index-test -code-completion-at=%s:3:2 %s | FileCheck -check-prefix=CHECK-CC2 %s +// RUN: c-index-test -code-completion-at=%s:3:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: {TypedText end} // CHECK-CC2: {TypedText optional} // CHECK-CC2: {TypedText property} // CHECK-CC2: {TypedText required} -// RUN: c-index-test -code-completion-at=%s:6:2 %s | FileCheck -check-prefix=CHECK-CC3 %s +// RUN: c-index-test -code-completion-at=%s:6:2 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s // CHECK-CC3: {TypedText dynamic}{HorizontalSpace }{Placeholder property} // CHECK-CC3: {TypedText end} // CHECK-CC3: {TypedText synthesize}{HorizontalSpace }{Placeholder property} -// RUN: c-index-test -code-completion-at=%s:2:1 %s | FileCheck -check-prefix=CHECK-CC4 %s +// RUN: c-index-test -code-completion-at=%s:2:1 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC4 %s // CHECK-CC4: NotImplemented:{TypedText @class}{HorizontalSpace }{Placeholder identifier} // CHECK-CC4: NotImplemented:{TypedText @compatibility_alias}{HorizontalSpace }{Placeholder alias}{HorizontalSpace }{Placeholder class} // CHECK-CC4: NotImplemented:{TypedText @implementation}{HorizontalSpace }{Placeholder class} @@ -34,7 +34,7 @@ // CHECK-CC4: TypedefDecl:{TypedText id} // CHECK-CC4: TypedefDecl:{TypedText SEL} -// RUN: c-index-test -code-completion-at=%s:3:1 %s | FileCheck -check-prefix=CHECK-CC5 %s +// RUN: c-index-test -code-completion-at=%s:3:1 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC5 %s // CHECK-CC5: {TypedText @end} // CHECK-CC5: {TypedText @optional} // CHECK-CC5: {TypedText @property} @@ -45,13 +45,13 @@ // CHECK-CC5: ObjCInterfaceDecl:{TypedText MyClass} // CHECK-CC5: TypedefDecl:{TypedText SEL} -// RUN: c-index-test -code-completion-at=%s:2:23 %s | FileCheck -check-prefix=CHECK-CC6 %s +// RUN: c-index-test -code-completion-at=%s:2:23 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC6 %s // CHECK-CC6: NotImplemented:{TypedText package} // CHECK-CC6: NotImplemented:{TypedText private} // CHECK-CC6: NotImplemented:{TypedText protected} // CHECK-CC6: NotImplemented:{TypedText public} -// RUN: c-index-test -code-completion-at=%s:2:22 %s | FileCheck -check-prefix=CHECK-CC7 %s +// RUN: c-index-test -code-completion-at=%s:2:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC7 %s // CHECK-CC7: NotImplemented:{TypedText @package} // CHECK-CC7: NotImplemented:{TypedText @private} // CHECK-CC7: NotImplemented:{TypedText @protected} diff --git a/clang/test/Index/complete-at-exprstmt.m b/clang/test/Index/complete-at-exprstmt.m index 87e554ff22a..85370989fd8 100644 --- a/clang/test/Index/complete-at-exprstmt.m +++ b/clang/test/Index/complete-at-exprstmt.m @@ -9,18 +9,18 @@ @synchronized (@encode(MyClass)) { } } @end -// RUN: c-index-test -code-completion-at=%s:9:4 %s | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:9:4 -Xclang -code-completion-patterns %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}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }} // CHECK-CC1: {TypedText throw}{HorizontalSpace }{Placeholder expression} // 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 +// RUN: c-index-test -code-completion-at=%s:9:19 -Xclang -code-completion-patterns %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 )} -// RUN: c-index-test -code-completion-at=%s:9:3 %s | FileCheck -check-prefix=CHECK-CC3 %s +// RUN: c-index-test -code-completion-at=%s:9:3 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC3 %s // CHECK-CC3: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} // CHECK-CC3: NotImplemented:{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )} // CHECK-CC3: NotImplemented:{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )} diff --git a/clang/test/Index/complete-exprs.c b/clang/test/Index/complete-exprs.c index efc82f90a9e..cee1d1c7761 100644 --- a/clang/test/Index/complete-exprs.c +++ b/clang/test/Index/complete-exprs.c @@ -7,9 +7,9 @@ int test(int i, int j, int k, int l) { return i | j | k & l; } -// RUN: c-index-test -code-completion-at=%s:7:9 %s | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:7:9 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} // CHECK-CC1: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} -// RUN: c-index-test -code-completion-at=%s:7:14 %s | FileCheck -check-prefix=CHECK-CC1 %s -// RUN: c-index-test -code-completion-at=%s:7:18 %s | FileCheck -check-prefix=CHECK-CC1 %s -// RUN: c-index-test -code-completion-at=%s:7:22 %s | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:7:14 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:7:18 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:7:22 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s diff --git a/clang/test/Index/complete-recovery.m b/clang/test/Index/complete-recovery.m index 2ea9fd9f77a..c28438da66f 100644 --- a/clang/test/Index/complete-recovery.m +++ b/clang/test/Index/complete-recovery.m @@ -11,11 +11,11 @@ } @end -// RUN: c-index-test -code-completion-at=%s:9:20 %s 2>%t | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:9:20 -Xclang -code-completion-patterns %s 2>%t | FileCheck -check-prefix=CHECK-CC1 %s // RUN: not grep error %t // CHECK-CC1: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )} // CHECK-CC1: NotImplemented:{TypedText _Bool} // CHECK-CC1: VarDecl:{ResultType A *}{TypedText a} // CHECK-CC1: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} -// RUN: c-index-test -code-completion-at=%s:10:24 %s 2>%t | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: c-index-test -code-completion-at=%s:10:24 -Xclang -code-completion-patterns %s 2>%t | FileCheck -check-prefix=CHECK-CC1 %s |

