diff options
Diffstat (limited to 'test/Index/complete-exprs.cpp')
-rw-r--r-- | test/Index/complete-exprs.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/test/Index/complete-exprs.cpp b/test/Index/complete-exprs.cpp index a810065..de3aac5 100644 --- a/test/Index/complete-exprs.cpp +++ b/test/Index/complete-exprs.cpp @@ -26,8 +26,30 @@ void g() { vector<int>(foo(), foo()); } -// RUN: c-index-test -code-completion-at=%s:20:2 %s | FileCheck -check-prefix=CHECK-CC1 %s -// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:20:2 %s | FileCheck -check-prefix=CHECK-CC1 %s +struct X { + void f() const; +}; + +void X::f() const { + +} + +namespace N { + int x; + class C { + int member; + + int f(int param) { + return member; + } + }; +} + +// RUN: c-index-test -code-completion-at=%s:20:2 %s -std=c++0x | FileCheck -check-prefix=CHECK-CC1 %s +// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:20:2 -std=c++0x %s | FileCheck -check-prefix=CHECK-CC1 %s +// CHECK-CC1: NotImplemented:{ResultType size_t}{TypedText alignof}{LeftParen (}{Placeholder type}{RightParen )} (40) +// CHECK-CC1: NotImplemented:{ResultType bool}{TypedText noexcept}{LeftParen (}{Placeholder expression}{RightParen )} (40) +// CHECK-CC1: NotImplemented:{ResultType std::nullptr_t}{TypedText nullptr} (40) // CHECK-CC1: NotImplemented:{TypedText operator} (40) // CHECK-CC1-NOT: push_back // CHECK-CC1: ClassDecl:{TypedText string} (50) @@ -51,3 +73,12 @@ void g() { // CHECK-CC3: ClassTemplate:{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50) // CHECK-CC3: CXXConstructor:{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >}{LeftParen (}{Placeholder const T &}{Comma , }{Placeholder unsigned int n}{RightParen )} (50) // CHECK-CC3: FunctionTemplate:{ResultType void}{TypedText vector}{LeftAngle <}{Placeholder typename T}{RightAngle >}{LeftParen (}{Placeholder InputIterator first}{Comma , }{Placeholder InputIterator last}{RightParen )} (50) + +// RUN: c-index-test -code-completion-at=%s:34:1 %s -std=c++0x | FileCheck -check-prefix=CHECK-CC4 %s +// CHECK-CC4: NotImplemented:{ResultType const X *}{TypedText this} (40) + +// RUN: c-index-test -code-completion-at=%s:43:14 %s | FileCheck -check-prefix=CHECK-CC5 %s +// CHECK-CC5: FieldDecl:{ResultType int}{TypedText member} (8) (parent: ClassDecl 'N::C') +// CHECK-CC5: ParmDecl:{ResultType int}{TypedText param} (8) +// CHECK-CC5: StructDecl:{TypedText X} (50) (parent: TranslationUnit '(null)') +// CHECK-CC5: VarDecl:{ResultType int}{TypedText x} (12) (parent: Namespace 'N') |