diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-08 16:40:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-08 16:40:19 +0000 |
commit | de4827dd340b77640b4cead98502148d8a5bcf70 (patch) | |
tree | 348c444a659bbb7e245e5fe8c2cbdd6daecc1485 /clang/tools/CIndex/CIndex.cpp | |
parent | 12852d9521243840968d38e9e4ee704f3713c3dd (diff) | |
download | bcm5719-llvm-de4827dd340b77640b4cead98502148d8a5bcf70.tar.gz bcm5719-llvm-de4827dd340b77640b4cead98502148d8a5bcf70.zip |
Extend ObjCMessageExpr for class method sends with the source location
of the class name.
llvm-svn: 97943
Diffstat (limited to 'clang/tools/CIndex/CIndex.cpp')
-rw-r--r-- | clang/tools/CIndex/CIndex.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 4ae2f806062..6fff1830438 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -315,6 +315,7 @@ public: bool VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E); bool VisitExplicitCastExpr(ExplicitCastExpr *E); bool VisitCompoundLiteralExpr(CompoundLiteralExpr *E); + bool VisitObjCMessageExpr(ObjCMessageExpr *E); }; } // end anonymous namespace @@ -901,6 +902,14 @@ bool CursorVisitor::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { return VisitExpr(E); } +bool CursorVisitor::VisitObjCMessageExpr(ObjCMessageExpr *E) { + ObjCMessageExpr::ClassInfo CI = E->getClassInfo(); + if (CI.Decl && Visit(MakeCursorObjCClassRef(CI.Decl, CI.Loc, TU))) + return true; + + return VisitExpr(E); +} + bool CursorVisitor::VisitAttributes(Decl *D) { for (const Attr *A = D->getAttrs(); A; A = A->getNext()) if (Visit(MakeCXCursor(A, D, TU))) |