diff options
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | clang/lib/Sema/CodeCompleteConsumer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp index 17e02c7473d..80496c5c441 100644 --- a/clang/lib/Sema/CodeCompleteConsumer.cpp +++ b/clang/lib/Sema/CodeCompleteConsumer.cpp @@ -425,10 +425,13 @@ void CodeCompletionResult::computeCursorKindAndAvailability(bool Accessible) { CursorKind = getCursorKindForDecl(Declaration); if (CursorKind == CXCursor_UnexposedDecl) { - // FIXME: Forward declarations of Objective-C classes are not directly - // exposed, but we want code completion to treat them like an @interface. + // FIXME: Forward declarations of Objective-C classes and protocols + // are not directly exposed, but we want code completion to treat them + // like a definition. if (isa<ObjCInterfaceDecl>(Declaration)) CursorKind = CXCursor_ObjCInterfaceDecl; + else if (isa<ObjCProtocolDecl>(Declaration)) + CursorKind = CXCursor_ObjCProtocolDecl; else CursorKind = CXCursor_NotImplemented; } |