diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-27 22:43:10 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-27 22:43:10 +0000 |
commit | deafd0b2a42b16568f416fbe218db82d56e2d89d (patch) | |
tree | 95d9f29e2f42e149a9aa1275d62d2b829da42c7f /clang/lib/Sema/CodeCompleteConsumer.cpp | |
parent | 45146a12cf0f3c0ebacc83ef936650c69e3303c8 (diff) | |
download | bcm5719-llvm-deafd0b2a42b16568f416fbe218db82d56e2d89d.tar.gz bcm5719-llvm-deafd0b2a42b16568f416fbe218db82d56e2d89d.zip |
Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.
llvm-svn: 147299
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | clang/lib/Sema/CodeCompleteConsumer.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp index da9860361bc..17e02c7473d 100644 --- a/clang/lib/Sema/CodeCompleteConsumer.cpp +++ b/clang/lib/Sema/CodeCompleteConsumer.cpp @@ -424,8 +424,14 @@ void CodeCompletionResult::computeCursorKindAndAvailability(bool Accessible) { Availability = CXAvailability_NotAvailable; CursorKind = getCursorKindForDecl(Declaration); - if (CursorKind == CXCursor_UnexposedDecl) - CursorKind = CXCursor_NotImplemented; + 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. + if (isa<ObjCInterfaceDecl>(Declaration)) + CursorKind = CXCursor_ObjCInterfaceDecl; + else + CursorKind = CXCursor_NotImplemented; + } break; case RK_Macro: |