diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-01-01 19:29:29 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-01-01 19:29:29 +0000 |
| commit | e6e48b1490fe79ca8d44718e48f8644a28efa097 (patch) | |
| tree | 5a6249e5bdcfbd786cbf68de755aca1c133a7e92 /clang/tools/libclang/CIndex.cpp | |
| parent | 01fb1135d66125f02111f04273684d25d73d2645 (diff) | |
| download | bcm5719-llvm-e6e48b1490fe79ca8d44718e48f8644a28efa097.tar.gz bcm5719-llvm-e6e48b1490fe79ca8d44718e48f8644a28efa097.zip | |
Move the data that corresponds to the definition of a protocol into a
separately-allocated DefinitionData structure. Introduce various
functions that will help with the separation of declarations from
definitions (isThisDeclarationADefinition(), hasDefinition(),
getDefinition()).
llvm-svn: 147408
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 33feadfdf1b..f2e6b01329a 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -4126,8 +4126,8 @@ CXCursor clang_getCursorDefinition(CXCursor C) { return clang_getNullCursor(); case Decl::ObjCProtocol: - if (!cast<ObjCProtocolDecl>(D)->isForwardDecl()) - return C; + if (ObjCProtocolDecl *Def = cast<ObjCProtocolDecl>(D)->getDefinition()) + return MakeCXCursor(Def, TU); return clang_getNullCursor(); case Decl::ObjCInterface: { |

