summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex/CIndex.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-08 14:59:44 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-08 14:59:44 +0000
commit12852d9521243840968d38e9e4ee704f3713c3dd (patch)
tree867728805f7b3274e56a2f787a91eff30e12c166 /clang/tools/CIndex/CIndex.cpp
parent7a9ba76825e8c741faa1b412c1d7cf5ee4d64041 (diff)
downloadbcm5719-llvm-12852d9521243840968d38e9e4ee704f3713c3dd.tar.gz
bcm5719-llvm-12852d9521243840968d38e9e4ee704f3713c3dd.zip
Keep track of type source information in the return type of an
Objective-C method declaration, e.g., for - (Foo *)myMethod; we now have TypeSourceInfo for the Foo*. llvm-svn: 97942
Diffstat (limited to 'clang/tools/CIndex/CIndex.cpp')
-rw-r--r--clang/tools/CIndex/CIndex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp
index 07bb7fbd83e..4ae2f806062 100644
--- a/clang/tools/CIndex/CIndex.cpp
+++ b/clang/tools/CIndex/CIndex.cpp
@@ -532,9 +532,10 @@ bool CursorVisitor::VisitVarDecl(VarDecl *D) {
}
bool CursorVisitor::VisitObjCMethodDecl(ObjCMethodDecl *ND) {
- // FIXME: We really need a TypeLoc covering Objective-C method declarations.
- // At the moment, we don't have information about locations in the return
- // type.
+ if (TypeSourceInfo *TSInfo = ND->getResultTypeSourceInfo())
+ if (Visit(TSInfo->getTypeLoc()))
+ return true;
+
for (ObjCMethodDecl::param_iterator P = ND->param_begin(),
PEnd = ND->param_end();
P != PEnd; ++P) {
OpenPOWER on IntegriCloud