Skip to content

Commit 97105e5

Browse files
committed
[libclang] Expose completion result kind in CXCompletionResult
This allows clients of libclang to check whether a completion result is a keyword. Previously, keywords had `CursorKind == CXCursor_NotImplemented` and it wasn't trivial to distinguish a keyword from a pattern. This change moves `CodeCompletionResult::ResultKind` to `clang-c` under a new name `CXCompletionResultKind`. It also tweaks `c-index-test` to print the result kind instead of `NotImplemented`, and adjusts the tests for the new output. rdar://91852088 Differential Revision: https://reviews.llvm.org/D136844
1 parent 48321ee commit 97105e5

25 files changed

+297
-234
lines changed

clang/include/clang-c/Index.h

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,6 +2080,23 @@ enum CXCursorKind {
20802080
CXCursor_OverloadCandidate = 700
20812081
};
20822082

2083+
/**
2084+
* Describes the kind of result generated.
2085+
*/
2086+
enum CXCompletionResultKind {
2087+
/** Refers to a declaration. */
2088+
CXCompletionResult_Declaration = 0,
2089+
2090+
/** Refers to a keyword or symbol. */
2091+
CXCompletionResult_Keyword = 1,
2092+
2093+
/** Refers to a macro. */
2094+
CXCompletionResult_Macro = 2,
2095+
2096+
/** Refers to a precomputed pattern. */
2097+
CXCompletionResult_Pattern = 3
2098+
};
2099+
20832100
/**
20842101
* A cursor representing some element in the abstract syntax tree for
20852102
* a translation unit.
@@ -4588,6 +4605,8 @@ CINDEX_LINKAGE void clang_disposeTokens(CXTranslationUnit TU, CXToken *Tokens,
45884605
*/
45894606

45904607
/* for debug/testing */
4608+
CINDEX_LINKAGE CXString
4609+
clang_getCompletionResultKindSpelling(enum CXCompletionResultKind Kind);
45914610
CINDEX_LINKAGE CXString clang_getCursorKindSpelling(enum CXCursorKind Kind);
45924611
CINDEX_LINKAGE void clang_getDefinitionSpellingAndExtent(
45934612
CXCursor, const char **startBuf, const char **endBuf, unsigned *startLine,
@@ -4631,12 +4650,17 @@ typedef void *CXCompletionString;
46314650
* A single result of code completion.
46324651
*/
46334652
typedef struct {
4653+
/**
4654+
* The kind of this completion result.
4655+
* Useful to distinguish between declarations and keywords.
4656+
*/
4657+
enum CXCompletionResultKind ResultKind;
4658+
46344659
/**
46354660
* The kind of entity that this completion refers to.
46364661
*
4637-
* The cursor kind will be a macro, keyword, or a declaration (one of the
4638-
* *Decl cursor kinds), describing the entity that the completion is
4639-
* referring to.
4662+
* The cursor kind will be a macro or a declaration (one of the *Decl cursor
4663+
* kinds), describing the entity that the completion is referring to.
46404664
*
46414665
* \todo In the future, we would like to provide a full cursor, to allow
46424666
* the client to extract additional information from declaration.

clang/test/Index/arc-complete.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ void test(id x) {
88

99
// RUN: c-index-test -code-completion-at=%s:4:4 %s -fobjc-arc -fobjc-nonfragile-abi | FileCheck -check-prefix=CHECK-CC1 %s
1010
// CHECK-CC1: macro definition:{TypedText __autoreleasing} (70)
11-
// CHECK-CC1: NotImplemented:{TypedText __bridge}{HorizontalSpace }{Placeholder type}{RightParen )}{Placeholder expression} (40)
12-
// CHECK-CC1: NotImplemented:{TypedText __bridge_retained}{HorizontalSpace }{Placeholder CF type}{RightParen )}{Placeholder expression} (40)
13-
// CHECK-CC1: NotImplemented:{TypedText __bridge_transfer}{HorizontalSpace }{Placeholder Objective-C type}{RightParen )}{Placeholder expression} (40)
11+
// CHECK-CC1: Pattern:{TypedText __bridge}{HorizontalSpace }{Placeholder type}{RightParen )}{Placeholder expression} (40)
12+
// CHECK-CC1: Pattern:{TypedText __bridge_retained}{HorizontalSpace }{Placeholder CF type}{RightParen )}{Placeholder expression} (40)
13+
// CHECK-CC1: Pattern:{TypedText __bridge_transfer}{HorizontalSpace }{Placeholder Objective-C type}{RightParen )}{Placeholder expression} (40)
1414
// CHECK-CC1: macro definition:{TypedText __strong} (70)
1515
// CHECK-CC1: macro definition:{TypedText __unsafe_unretained} (70)
1616
// CHECK-CC1: macro definition:{TypedText __weak} (70)

clang/test/Index/code-completion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ void test_template_alias() {
8282
// CHECK-OVERLOAD-NEXT: Objective-C interface
8383

8484
// RUN: c-index-test -code-completion-at=%s:37:10 %s | FileCheck -check-prefix=CHECK-EXPR %s
85-
// CHECK-EXPR: NotImplemented:{TypedText int} (50)
86-
// CHECK-EXPR: NotImplemented:{TypedText long} (50)
85+
// CHECK-EXPR: Keyword:{TypedText int} (50)
86+
// CHECK-EXPR: Keyword:{TypedText long} (50)
8787
// CHECK-EXPR: FieldDecl:{ResultType double}{TypedText member} (17)
8888
// CHECK-EXPR: FieldDecl:{ResultType int}{Text X::}{TypedText member} (9)
8989
// CHECK-EXPR: FieldDecl:{ResultType float}{Text Y::}{TypedText member} (18)

clang/test/Index/complete-at-directives.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ @implementation MyClass
2424
// CHECK-CC3: {TypedText synthesize}{HorizontalSpace }{Placeholder property}
2525

2626
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:1 %s | FileCheck -check-prefix=CHECK-CC4 %s
27-
// CHECK-CC4: NotImplemented:{TypedText @class}{HorizontalSpace }{Placeholder name}
28-
// CHECK-CC4: NotImplemented:{TypedText @compatibility_alias}{HorizontalSpace }{Placeholder alias}{HorizontalSpace }{Placeholder class}
29-
// CHECK-CC4: NotImplemented:{TypedText @implementation}{HorizontalSpace }{Placeholder class}
30-
// CHECK-CC4: NotImplemented:{TypedText @interface}{HorizontalSpace }{Placeholder class}
31-
// CHECK-CC4: NotImplemented:{TypedText @protocol}{HorizontalSpace }{Placeholder protocol}
32-
// CHECK-CC4: NotImplemented:{TypedText _Bool}
27+
// CHECK-CC4: Pattern:{TypedText @class}{HorizontalSpace }{Placeholder name}
28+
// CHECK-CC4: Pattern:{TypedText @compatibility_alias}{HorizontalSpace }{Placeholder alias}{HorizontalSpace }{Placeholder class}
29+
// CHECK-CC4: Pattern:{TypedText @implementation}{HorizontalSpace }{Placeholder class}
30+
// CHECK-CC4: Pattern:{TypedText @interface}{HorizontalSpace }{Placeholder class}
31+
// CHECK-CC4: Pattern:{TypedText @protocol}{HorizontalSpace }{Placeholder protocol}
32+
// CHECK-CC4: Keyword:{TypedText _Bool}
3333
// CHECK-CC4: TypedefDecl:{TypedText Class}
3434
// CHECK-CC4: TypedefDecl:{TypedText id}
3535
// CHECK-CC4: TypedefDecl:{TypedText SEL}
@@ -41,14 +41,14 @@ @implementation MyClass
4141
// CHECK-CC5: {TypedText @required}
4242

4343
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:23 %s | FileCheck -check-prefix=CHECK-CC6 %s
44-
// CHECK-CC6: NotImplemented:{TypedText package}
45-
// CHECK-CC6: NotImplemented:{TypedText private}
46-
// CHECK-CC6: NotImplemented:{TypedText protected}
47-
// CHECK-CC6: NotImplemented:{TypedText public}
44+
// CHECK-CC6: Keyword:{TypedText package}
45+
// CHECK-CC6: Keyword:{TypedText private}
46+
// CHECK-CC6: Keyword:{TypedText protected}
47+
// CHECK-CC6: Keyword:{TypedText public}
4848

4949
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:22 %s | FileCheck -check-prefix=CHECK-CC7 %s
50-
// CHECK-CC7: NotImplemented:{TypedText @package}
51-
// CHECK-CC7: NotImplemented:{TypedText @private}
52-
// CHECK-CC7: NotImplemented:{TypedText @protected}
53-
// CHECK-CC7: NotImplemented:{TypedText @public}
54-
// CHECK-CC7: NotImplemented:{TypedText _Bool}
50+
// CHECK-CC7: Keyword:{TypedText @package}
51+
// CHECK-CC7: Keyword:{TypedText @private}
52+
// CHECK-CC7: Keyword:{TypedText @protected}
53+
// CHECK-CC7: Keyword:{TypedText @public}
54+
// CHECK-CC7: Keyword:{TypedText _Bool}

clang/test/Index/complete-at-exprstmt.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@ void f() {
3131
// CHECK-CC2: {TypedText protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
3232
// CHECK-CC2: {TypedText selector}{LeftParen (}{Placeholder selector}{RightParen )}
3333
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:3 %s | FileCheck -check-prefix=CHECK-CC3 %s
34-
// CHECK-CC3: NotImplemented:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
35-
// CHECK-CC3: NotImplemented:{ResultType Protocol *}{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
36-
// CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )}
37-
// CHECK-CC3: NotImplemented:{TypedText @synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
38-
// CHECK-CC3: NotImplemented:{TypedText @throw}{HorizontalSpace }{Placeholder expression}
39-
// CHECK-CC3: NotImplemented:{TypedText @try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
40-
// CHECK-CC3: NotImplemented:{ResultType SEL}{TypedText _cmd}
34+
// CHECK-CC3: Pattern:{ResultType char[]}{TypedText @encode}{LeftParen (}{Placeholder type-name}{RightParen )}
35+
// CHECK-CC3: Pattern:{ResultType Protocol *}{TypedText @protocol}{LeftParen (}{Placeholder protocol-name}{RightParen )}
36+
// CHECK-CC3: Pattern:{ResultType SEL}{TypedText @selector}{LeftParen (}{Placeholder selector}{RightParen )}
37+
// CHECK-CC3: Pattern:{TypedText @synchronized}{HorizontalSpace }{LeftParen (}{Placeholder expression}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}
38+
// CHECK-CC3: Pattern:{TypedText @throw}{HorizontalSpace }{Placeholder expression}
39+
// CHECK-CC3: Pattern:{TypedText @try}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @catch}{LeftParen (}{Placeholder parameter}{RightParen )}{LeftBrace {}{Placeholder statements}{RightBrace }}{Text @finally}{LeftBrace {}{Placeholder statements}{RightBrace }}
40+
// CHECK-CC3: Declaration:{ResultType SEL}{TypedText _cmd}
4141
// CHECK-CC3: ParmDecl:{ResultType int}{TypedText arg}
4242
// CHECK-CC3: TypedefDecl:{TypedText Class}
4343
// CHECK-CC3: TypedefDecl:{TypedText id}
4444
// CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText ivar}
4545
// CHECK-CC3: ObjCInterfaceDecl:{TypedText MyClass}
4646
// CHECK-CC3: TypedefDecl:{TypedText SEL}
47-
// CHECK-CC3: NotImplemented:{ResultType MyClass *}{TypedText self}
47+
// CHECK-CC3: Declaration:{ResultType MyClass *}{TypedText self}
4848
// RUN: c-index-test -code-completion-at=%s:19:13 %s | FileCheck -check-prefix=CHECK-CC4 %s
49-
// CHECK-CC4: NotImplemented:{TypedText add:to:} (40)
50-
// CHECK-CC4: NotImplemented:{TypedText add:to:plus:} (40)
51-
// CHECK-CC4: NotImplemented:{TypedText myMethod:} (40)
49+
// CHECK-CC4: Pattern:{TypedText add:to:} (40)
50+
// CHECK-CC4: Pattern:{TypedText add:to:plus:} (40)
51+
// CHECK-CC4: Pattern:{TypedText myMethod:} (40)
5252
// RUN: c-index-test -code-completion-at=%s:19:17 %s | FileCheck -check-prefix=CHECK-CC5 %s
53-
// CHECK-CC5: NotImplemented:{Informative add:}{TypedText to:} (40)
54-
// CHECK-CC5: NotImplemented:{Informative add:}{TypedText to:plus:} (40)
53+
// CHECK-CC5: Pattern:{Informative add:}{TypedText to:} (40)
54+
// CHECK-CC5: Pattern:{Informative add:}{TypedText to:plus:} (40)
5555

clang/test/Index/complete-declarators.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ struct Z {
1616

1717
// RUN: c-index-test -code-completion-at=%s:8:5 %s | FileCheck -check-prefix=CHECK-CC1 %s
1818
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:8:5 %s | FileCheck -check-prefix=CHECK-CC1 %s
19-
// CHECK-CC1: NotImplemented:{TypedText const} (40)
19+
// CHECK-CC1: Keyword:{TypedText const} (40)
2020
// CHECK-CC1: Namespace:{TypedText N}{Text ::} (75)
21-
// CHECK-CC1: NotImplemented:{TypedText operator} (40)
22-
// CHECK-CC1: NotImplemented:{TypedText volatile} (40)
21+
// CHECK-CC1: Keyword:{TypedText operator} (40)
22+
// CHECK-CC1: Keyword:{TypedText volatile} (40)
2323
// RUN: c-index-test -code-completion-at=%s:8:11 %s | FileCheck -check-prefix=CHECK-CC2 %s
2424
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:8:11 %s | FileCheck -check-prefix=CHECK-CC2 %s
25-
// CHECK-CC2: NotImplemented:{TypedText const} (40)
25+
// CHECK-CC2: Keyword:{TypedText const} (40)
2626
// CHECK-CC2-NOT: Namespace:{TypedText N}{Text ::} (75)
27-
// CHECK-CC2-NOT: NotImplemented:{TypedText operator} (40)
28-
// CHECK-CC2: NotImplemented:{TypedText volatile} (40)
27+
// CHECK-CC2-NOT: Keyword:{TypedText operator} (40)
28+
// CHECK-CC2: Keyword:{TypedText volatile} (40)
2929
// RUN: c-index-test -code-completion-at=%s:13:7 %s | FileCheck -check-prefix=CHECK-CC3 %s
3030
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:13:7 %s | FileCheck -check-prefix=CHECK-CC3 %s
31-
// CHECK-CC3: NotImplemented:{TypedText const} (40)
31+
// CHECK-CC3: Keyword:{TypedText const} (40)
3232
// CHECK-CC3-NOT: Namespace:{TypedText N}{Text ::} (75)
33-
// CHECK-CC3: NotImplemented:{TypedText operator} (40)
34-
// CHECK-CC3: NotImplemented:{TypedText volatile} (40)
33+
// CHECK-CC3: Keyword:{TypedText operator} (40)
34+
// CHECK-CC3: Keyword:{TypedText volatile} (40)
3535
// RUN: c-index-test -code-completion-at=%s:14:14 %s | FileCheck -check-prefix=CHECK-CC4 %s
3636
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:14 %s | FileCheck -check-prefix=CHECK-CC4 %s
37-
// CHECK-CC4: NotImplemented:{TypedText const} (40)
37+
// CHECK-CC4: Keyword:{TypedText const} (40)
3838
// CHECK-CC4: Namespace:{TypedText N}{Text ::} (75)
39-
// CHECK-CC4: NotImplemented:{TypedText operator} (40)
40-
// CHECK-CC4: NotImplemented:{TypedText volatile} (40)
39+
// CHECK-CC4: Keyword:{TypedText operator} (40)
40+
// CHECK-CC4: Keyword:{TypedText volatile} (40)
4141
// CHECK-CC4: StructDecl:{TypedText Y}{Text ::} (75)
4242
// CHECK-CC4: StructDecl:{TypedText Z}{Text ::} (75)
4343

clang/test/Index/complete-declarators.m

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,62 +26,62 @@ - (boid)method2 {}
2626
@end
2727

2828
// RUN: c-index-test -code-completion-at=%s:7:4 %s | FileCheck -check-prefix=CHECK-CC0 %s
29-
// CHECK-CC0: NotImplemented:{TypedText IBAction}{RightParen )}{Placeholder selector}{Colon :}{LeftParen (}{Text id}{RightParen )}{Text sender} (40)
29+
// CHECK-CC0: Pattern:{TypedText IBAction}{RightParen )}{Placeholder selector}{Colon :}{LeftParen (}{Text id}{RightParen )}{Text sender} (40)
3030
// CHECK-CC0: macro definition:{TypedText IBAction} (70)
3131
// CHECK-CC0: macro definition:{TypedText IBOutlet} (70)
3232
// CHECK-CC0: macro definition:{TypedText IBOutletCollection}{LeftParen (}{Placeholder ClassName}{RightParen )} (70)
3333
// CHECK-CC0: TypedefDecl:{TypedText id} (50)
34-
// CHECK-CC0: NotImplemented:{TypedText in} (40)
35-
// CHECK-CC0: NotImplemented:{TypedText inout} (40)
36-
// CHECK-CC0: NotImplemented:{TypedText instancetype} (40)
37-
// CHECK-CC0: NotImplemented:{TypedText int} (50)
38-
// CHECK-CC0: NotImplemented:{TypedText long} (50)
34+
// CHECK-CC0: Keyword:{TypedText in} (40)
35+
// CHECK-CC0: Keyword:{TypedText inout} (40)
36+
// CHECK-CC0: Keyword:{TypedText instancetype} (40)
37+
// CHECK-CC0: Keyword:{TypedText int} (50)
38+
// CHECK-CC0: Keyword:{TypedText long} (50)
3939
// RUN: c-index-test -code-completion-at=%s:7:19 %s | FileCheck -check-prefix=CHECK-CC1 %s
40-
// CHECK-CC1-NOT: NotImplemented:{TypedText extern} (40)
41-
// CHECK-CC1: NotImplemented:{TypedText param1} (40)
40+
// CHECK-CC1-NOT: Keyword:{TypedText extern} (40)
41+
// CHECK-CC1: Pattern:{TypedText param1} (40)
4242
// RUN: c-index-test -code-completion-at=%s:9:15 %s | FileCheck -check-prefix=CHECK-CC2 %s
4343
// RUN: c-index-test -code-completion-at=%s:15:10 %s | FileCheck -check-prefix=CHECK-CC2 %s
4444
// RUN: c-index-test -code-completion-at=%s:16:9 %s | FileCheck -check-prefix=CHECK-CC2 %s
45-
// CHECK-CC2: NotImplemented:{TypedText const} (40)
45+
// CHECK-CC2: Keyword:{TypedText const} (40)
4646
// CHECK-CC2-NOT: int
47-
// CHECK-CC2: NotImplemented:{TypedText restrict} (40)
48-
// CHECK-CC2: NotImplemented:{TypedText volatile} (40)
47+
// CHECK-CC2: Keyword:{TypedText restrict} (40)
48+
// CHECK-CC2: Keyword:{TypedText volatile} (40)
4949
// RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC3 %s
5050
// CHECK-CC3: ParmDecl:{ResultType id}{TypedText param1} (34)
5151
// CHECK-CC3-NOT: VarDecl:{ResultType int}{TypedText q2}
5252
// CHECK-CC3-NOT: VarDecl:{ResultType id}{TypedText q}
53-
// CHECK-CC3: NotImplemented:{ResultType A *}{TypedText self} (34)
54-
// CHECK-CC3: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
53+
// CHECK-CC3: Declaration:{ResultType A *}{TypedText self} (34)
54+
// CHECK-CC3: Pattern:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
5555
// RUN: c-index-test -code-completion-at=%s:15:15 %s | FileCheck -check-prefix=CHECK-CC4 %s
5656
// CHECK-CC4: ParmDecl:{ResultType id}{TypedText param1} (34)
5757
// CHECK-CC4-NOT: VarDecl:{ResultType int}{TypedText q2}
58-
// CHECK-CC4: NotImplemented:{ResultType A *}{TypedText self} (34)
59-
// CHECK-CC4: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
58+
// CHECK-CC4: Declaration:{ResultType A *}{TypedText self} (34)
59+
// CHECK-CC4: Pattern:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )} (40)
6060
// RUN: c-index-test -code-completion-at=%s:23:10 %s | FileCheck -check-prefix=CHECK-CC5 %s
61-
// CHECK-CC5: NotImplemented:{TypedText _Bool} (50)
62-
// CHECK-CC5: NotImplemented:{TypedText _Complex} (50)
63-
// CHECK-CC5: NotImplemented:{TypedText _Imaginary} (50)
61+
// CHECK-CC5: Keyword:{TypedText _Bool} (50)
62+
// CHECK-CC5: Keyword:{TypedText _Complex} (50)
63+
// CHECK-CC5: Keyword:{TypedText _Imaginary} (50)
6464
// CHECK-CC5: ObjCInterfaceDecl:{TypedText A} (50)
65-
// CHECK-CC5: NotImplemented:{TypedText char} (50)
65+
// CHECK-CC5: Keyword:{TypedText char} (50)
6666
// CHECK-CC5: TypedefDecl:{TypedText Class} (50)
67-
// CHECK-CC5: NotImplemented:{TypedText const} (50)
68-
// CHECK-CC5: NotImplemented:{TypedText double} (50)
69-
// CHECK-CC5: NotImplemented:{TypedText enum} (50)
70-
// CHECK-CC5: NotImplemented:{TypedText float} (50)
67+
// CHECK-CC5: Keyword:{TypedText const} (50)
68+
// CHECK-CC5: Keyword:{TypedText double} (50)
69+
// CHECK-CC5: Keyword:{TypedText enum} (50)
70+
// CHECK-CC5: Keyword:{TypedText float} (50)
7171
// CHECK-CC5: TypedefDecl:{TypedText id} (50)
72-
// CHECK-CC5: NotImplemented:{TypedText int} (50)
73-
// CHECK-CC5: NotImplemented:{TypedText long} (50)
74-
// CHECK-CC5: NotImplemented:{TypedText restrict} (50)
72+
// CHECK-CC5: Keyword:{TypedText int} (50)
73+
// CHECK-CC5: Keyword:{TypedText long} (50)
74+
// CHECK-CC5: Keyword:{TypedText restrict} (50)
7575
// CHECK-CC5: TypedefDecl:{TypedText SEL} (50)
76-
// CHECK-CC5: NotImplemented:{TypedText short} (50)
77-
// CHECK-CC5: NotImplemented:{TypedText signed} (50)
78-
// CHECK-CC5: NotImplemented:{TypedText struct} (50)
79-
// CHECK-CC5: NotImplemented:{TypedText typeof}{HorizontalSpace }{Placeholder expression} (40)
80-
// CHECK-CC5: NotImplemented:{TypedText typeof}{LeftParen (}{Placeholder type}{RightParen )} (40)
81-
// CHECK-CC5: NotImplemented:{TypedText union} (50)
82-
// CHECK-CC5: NotImplemented:{TypedText unsigned} (50)
83-
// CHECK-CC5: NotImplemented:{TypedText void} (50)
84-
// CHECK-CC5: NotImplemented:{TypedText volatile} (50)
76+
// CHECK-CC5: Keyword:{TypedText short} (50)
77+
// CHECK-CC5: Keyword:{TypedText signed} (50)
78+
// CHECK-CC5: Keyword:{TypedText struct} (50)
79+
// CHECK-CC5: Pattern:{TypedText typeof}{HorizontalSpace }{Placeholder expression} (40)
80+
// CHECK-CC5: Pattern:{TypedText typeof}{LeftParen (}{Placeholder type}{RightParen )} (40)
81+
// CHECK-CC5: Keyword:{TypedText union} (50)
82+
// CHECK-CC5: Keyword:{TypedText unsigned} (50)
83+
// CHECK-CC5: Keyword:{TypedText void} (50)
84+
// CHECK-CC5: Keyword:{TypedText volatile} (50)
8585

8686
// Check that there are no duplicate entries if we code-complete after an @implementation
8787
// RUN: c-index-test -code-completion-at=%s:27:1 %s | FileCheck -check-prefix=CHECK-CC6 %s

0 commit comments

Comments
 (0)