diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-19 10:33:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-19 10:33:04 +0000 |
commit | 657bc3d9848e3be92029b2416031340988cd0111 (patch) | |
tree | 5b9c2fa9d79942fbdce3d618e37e27c18263af9a /test/Index | |
parent | 56d91b49b13fe55c918afbda19f6165b5fbff87a (diff) | |
download | src-657bc3d9848e3be92029b2416031340988cd0111.tar.gz src-657bc3d9848e3be92029b2416031340988cd0111.zip |
Vendor import of clang trunk r162107:vendor/clang/clang-trunk-r162107
Notes
Notes:
svn path=/vendor/clang/dist/; revision=239392
svn path=/vendor/clang/clang-trunk-r162107/; revision=239393; tag=vendor/clang/clang-trunk-r162107
Diffstat (limited to 'test/Index')
-rw-r--r-- | test/Index/complete-enums.cpp | 4 | ||||
-rw-r--r-- | test/Index/complete-exprs.m | 4 | ||||
-rw-r--r-- | test/Index/complete-preamble.cpp | 8 | ||||
-rw-r--r-- | test/Index/complete-preamble.h | 6 |
4 files changed, 18 insertions, 4 deletions
diff --git a/test/Index/complete-enums.cpp b/test/Index/complete-enums.cpp index 49a893258773..23c60ac4dfa5 100644 --- a/test/Index/complete-enums.cpp +++ b/test/Index/complete-enums.cpp @@ -1,6 +1,6 @@ // Note: the run lines follow their respective tests, since line/column // matter in this test. - +struct X { X(); ~X(); }; enum class Color { Red = 17, Green, @@ -9,7 +9,7 @@ enum class Color { int Greeby(); void f(Color color) { switch (color) { - case Color::Green: + case Color::Green: { X x; } case Color::Red; } } diff --git a/test/Index/complete-exprs.m b/test/Index/complete-exprs.m index 3fb1540351d5..16eeda9bff4b 100644 --- a/test/Index/complete-exprs.m +++ b/test/Index/complete-exprs.m @@ -21,7 +21,7 @@ __strong id global; // CHECK-CC1: NotImplemented:{ResultType NSString *}{TypedText @"}{Placeholder string}{Text "} (40) // CHECK-CC1: NotImplemented:{ResultType id}{TypedText @(}{Placeholder expression}{RightParen )} (40) // CHECK-CC1: NotImplemented:{ResultType NSArray *}{TypedText @[}{Placeholder objects, ...}{RightBracket ]} (40) -// CHECK-CC1: NotImplemented:{ResultType NSDictionary *}{TypedText @{}{Placeholder key}{HorizontalSpace }{Colon :}{HorizontalSpace }{Placeholder object, ...}{RightBrace }} (40) +// CHECK-CC1: NotImplemented:{ResultType NSDictionary *}{TypedText @{}{Placeholder key}{Colon :}{HorizontalSpace }{Placeholder object, ...}{RightBrace }} (40) // CHECK-CC1: NotImplemented:{ResultType SEL}{TypedText _cmd} (80) // CHECK-CC1: TypedefDecl:{TypedText BOOL} (50) // CHECK-CC1: macro definition:{TypedText bool} (51) @@ -43,7 +43,7 @@ __strong id global; // RUN: c-index-test -code-completion-at=%s:16:5 %s | FileCheck -check-prefix=CHECK-CC4 %s // RUN: c-index-test -code-completion-at=%s:16:14 %s | FileCheck -check-prefix=CHECK-CC4 %s // CHECK-CC4: NotImplemented:{ResultType NSArray *}{TypedText @[}{Placeholder objects, ...}{RightBracket ]} (40) -// CHECK-CC4: NotImplemented:{ResultType NSDictionary *}{TypedText @{}{Placeholder key}{HorizontalSpace }{Colon :}{HorizontalSpace }{Placeholder object, ...}{RightBrace }} (40) +// CHECK-CC4: NotImplemented:{ResultType NSDictionary *}{TypedText @{}{Placeholder key}{Colon :}{HorizontalSpace }{Placeholder object, ...}{RightBrace }} (40) // CHECK-CC4: NotImplemented:{ResultType SEL}{TypedText _cmd} (80) // CHECK-CC4: macro definition:{TypedText bool} (51) // CHECK-CC4: macro definition:{TypedText NO} (65) diff --git a/test/Index/complete-preamble.cpp b/test/Index/complete-preamble.cpp new file mode 100644 index 000000000000..8f4810522527 --- /dev/null +++ b/test/Index/complete-preamble.cpp @@ -0,0 +1,8 @@ +#include "complete-preamble.h" +void f() { + std:: +} + +// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:3:8 %s -o - | FileCheck -check-prefix=CC1 %s +// CHECK-CC1: {ResultType void}{TypedText wibble}{LeftParen (}{RightParen )} (50) (parent: Namespace 'std') + diff --git a/test/Index/complete-preamble.h b/test/Index/complete-preamble.h new file mode 100644 index 000000000000..e696284c0964 --- /dev/null +++ b/test/Index/complete-preamble.h @@ -0,0 +1,6 @@ +namespace std { + void wibble(); +} + +namespace std { +} |