aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CodeCompletion/truncation.c11
-rw-r--r--test/Index/complete-at-exprstmt.m1
-rw-r--r--test/Index/complete-cxx-inline-methods.cpp24
-rw-r--r--test/Index/complete-declarators.m1
-rw-r--r--test/Index/complete-exprs.m1
-rw-r--r--test/Index/complete-objc-message-id.m1
-rw-r--r--test/Index/complete-objc-message.m1
-rw-r--r--test/Index/complete-recovery.m1
-rw-r--r--test/Index/complete-super.m1
-rw-r--r--test/Index/complete-synthesized.m29
10 files changed, 37 insertions, 34 deletions
diff --git a/test/CodeCompletion/truncation.c b/test/CodeCompletion/truncation.c
index 1b446b7d92..473e85847e 100644
--- a/test/CodeCompletion/truncation.c
+++ b/test/CodeCompletion/truncation.c
@@ -1,18 +1,15 @@
#include "truncation.c.h"
-struct
-
/* foo */
+struct
+
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s.h:4:8 -o - %s | FileCheck -check-prefix=CC1 %s
// CHECK-CC1: X
// CHECK-CC1-NEXT: Y
-// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:3:8 -o - %s | FileCheck -check-prefix=CC2 %s
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:5:8 -o - %s | FileCheck -check-prefix=CC2 %s
// CHECK-CC2: X
// CHECK-CC2: Xa
// CHECK-CC2: Y
-// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:5:3 -o - %s | FileCheck -check-prefix=CC3 %s
-// CHECK-CC3: X
-// CHECK-CC3: Xa
-// CHECK-CC3: Y
+// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:3:3 -o - %s
diff --git a/test/Index/complete-at-exprstmt.m b/test/Index/complete-at-exprstmt.m
index eaef9ec753..7532bbb14d 100644
--- a/test/Index/complete-at-exprstmt.m
+++ b/test/Index/complete-at-exprstmt.m
@@ -1,6 +1,5 @@
/* The run lines are below, because this test is line- and
column-number sensitive. */
-// XFAIL: *
@interface MyClass { int ivar; }
- (int)myMethod:(int)arg;
@end
diff --git a/test/Index/complete-cxx-inline-methods.cpp b/test/Index/complete-cxx-inline-methods.cpp
new file mode 100644
index 0000000000..e25949df4c
--- /dev/null
+++ b/test/Index/complete-cxx-inline-methods.cpp
@@ -0,0 +1,24 @@
+class MyCls {
+ void in_foo() {
+ vec.x = 0;
+ }
+ void out_foo();
+
+ struct Vec { int x, y; };
+ Vec vec;
+};
+
+void MyCls::out_foo() {
+ vec.x = 0;
+}
+
+// RUN: c-index-test -code-completion-at=%s:3:9 %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:12:7 %s | FileCheck %s
+// CHECK: CXXMethod:{ResultType MyCls::Vec &}{TypedText operator=}{LeftParen (}{Placeholder const MyCls::Vec &}{RightParen )} (34)
+// CHECK-NEXT: StructDecl:{TypedText Vec}{Text ::} (75)
+// CHECK-NEXT: FieldDecl:{ResultType int}{TypedText x} (35)
+// CHECK-NEXT: FieldDecl:{ResultType int}{TypedText y} (35)
+// CHECK-NEXT: CXXDestructor:{ResultType void}{TypedText ~Vec}{LeftParen (}{RightParen )} (34)
+// CHECK-NEXT: Completion contexts:
+// CHECK-NEXT: Dot member access
+// CHECK-NEXT: Container Kind: StructDecl
diff --git a/test/Index/complete-declarators.m b/test/Index/complete-declarators.m
index a0d81e1c37..747da018af 100644
--- a/test/Index/complete-declarators.m
+++ b/test/Index/complete-declarators.m
@@ -1,5 +1,4 @@
// This test is line- and column-sensitive, so test commands are at the bottom.
-// XFAIL: *
@protocol P
- (int)method:(id)param1;
@end
diff --git a/test/Index/complete-exprs.m b/test/Index/complete-exprs.m
index c6c7223719..dfa114dcc0 100644
--- a/test/Index/complete-exprs.m
+++ b/test/Index/complete-exprs.m
@@ -1,4 +1,3 @@
-// XFAIL: *
typedef signed char BOOL;
#define YES ((BOOL)1)
#define NO ((BOOL)0)
diff --git a/test/Index/complete-objc-message-id.m b/test/Index/complete-objc-message-id.m
index 35caff3004..415e0ff021 100644
--- a/test/Index/complete-objc-message-id.m
+++ b/test/Index/complete-objc-message-id.m
@@ -1,7 +1,6 @@
// Note: the run lines follow their respective tests, since line/column
// matter in this test.
-// XFAIL: *
@interface A
+ (id)alloc;
+ (id)init;
diff --git a/test/Index/complete-objc-message.m b/test/Index/complete-objc-message.m
index 6f5fc679eb..955ab6f144 100644
--- a/test/Index/complete-objc-message.m
+++ b/test/Index/complete-objc-message.m
@@ -1,6 +1,5 @@
// Note: the run lines follow their respective tests, since line/column
// matter in this test.
-// XFAIL: *
#define nil (void*)0
@protocol FooTestProtocol
+ protocolClassMethod;
diff --git a/test/Index/complete-recovery.m b/test/Index/complete-recovery.m
index 74b2606c65..9300a79992 100644
--- a/test/Index/complete-recovery.m
+++ b/test/Index/complete-recovery.m
@@ -1,6 +1,5 @@
/* Run lines are at the end, since line/column matter in this test. */
-// XFAIL: *
@interface A
- (void)method:(int)x;
@end
diff --git a/test/Index/complete-super.m b/test/Index/complete-super.m
index 926a30086c..6c2daa8082 100644
--- a/test/Index/complete-super.m
+++ b/test/Index/complete-super.m
@@ -1,6 +1,5 @@
// Note: the run lines follow their respective tests, since line/column
// matter in this test.
-// XFAIL: *
typedef int Bool;
diff --git a/test/Index/complete-synthesized.m b/test/Index/complete-synthesized.m
index 66b59cd0b1..4d2d80b845 100644
--- a/test/Index/complete-synthesized.m
+++ b/test/Index/complete-synthesized.m
@@ -1,6 +1,5 @@
// Note: this test is line- and column-sensitive. Test commands are at
// the end.
-// XFAIL: *
@interface A
@@ -36,22 +35,12 @@
}
@end
-// RUN: c-index-test -code-completion-at=%s:24:1 -Xclang -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: NotImplemented:{TypedText _Bool} (50)
-// CHECK-CC1: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
-// CHECK-CC1-NOT: prop2
-// CHECK-CC1: ObjCPropertyDecl:{ResultType short}{TypedText prop3} (35)
-// CHECK-CC1: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
-
-// RUN: c-index-test -code-completion-at=%s:30:2 -Xclang -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: NotImplemented:{TypedText _Bool} (50)
-// CHECK-CC2: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
-// CHECK-CC2-NOT: prop3
-// CHECK-CC2: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
-
-// RUN: c-index-test -code-completion-at=%s:34:2 -Xclang -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: NotImplemented:{TypedText _Bool} (50)
-// CHECK-CC3: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
-// CHECK-CC3: ObjCPropertyDecl:{ResultType double}{TypedText prop4}
-// CHECK-CC3-NOT: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
-// CHECK-CC1: restrict
+// RUN: c-index-test -code-completion-at=%s:24:1 -Xclang -fobjc-nonfragile-abi -fobjc-default-synthesize-properties %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:30:2 -Xclang -fobjc-nonfragile-abi -fobjc-default-synthesize-properties %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:34:2 -Xclang -fobjc-nonfragile-abi -fobjc-default-synthesize-properties %s | FileCheck %s
+
+// CHECK: NotImplemented:{TypedText _Bool} (50)
+// CHECK: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
+// CHECK-NOT: prop2
+// CHECK-NOT: prop3
+// CHECK: ObjCIvarDecl:{ResultType double}{TypedText prop4} (37)