Do not produce types as valid code completions when we're in an
expression context in C/Objective-C, or when we're in an
@interface/@implementation/@protocol in Objective-C(++).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104908 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/complete-recovery.m b/test/Index/complete-recovery.m
index c28438d..e03834e 100644
--- a/test/Index/complete-recovery.m
+++ b/test/Index/complete-recovery.m
@@ -14,8 +14,12 @@
 // 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-NOT: 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 -Xclang -code-completion-patterns %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-CC2 %s
+// CHECK-CC2: NotImplemented:{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
+// CHECK-CC2: NotImplemented:{TypedText _Bool}
+// CHECK-CC2: VarDecl:{ResultType A *}{TypedText a}
+// CHECK-CC2: NotImplemented:{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )}