diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-20 15:39:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-20 15:39:42 +0000 |
commit | abd9e9689adcb5fb2fa65c2a069375dee017b037 (patch) | |
tree | 3b9f9a91714ef6be53c3600d0958e197bc5555d6 /clang/tools/CIndex/CIndex.cpp | |
parent | 950fe784be6a2ad13bd47aef034ed025cccb97e7 (diff) | |
download | bcm5719-llvm-abd9e9689adcb5fb2fa65c2a069375dee017b037.tar.gz bcm5719-llvm-abd9e9689adcb5fb2fa65c2a069375dee017b037.zip |
Keep proper source location information for the type in an Objective-C
@encode expression.
llvm-svn: 101907
Diffstat (limited to 'clang/tools/CIndex/CIndex.cpp')
-rw-r--r-- | clang/tools/CIndex/CIndex.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 10c399591bb..eb93a8f3017 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -305,6 +305,7 @@ public: bool VisitCompoundLiteralExpr(CompoundLiteralExpr *E); bool VisitExplicitCastExpr(ExplicitCastExpr *E); bool VisitObjCMessageExpr(ObjCMessageExpr *E); + bool VisitObjCEncodeExpr(ObjCEncodeExpr *E); bool VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E); }; @@ -977,6 +978,11 @@ bool CursorVisitor::VisitObjCMessageExpr(ObjCMessageExpr *E) { return VisitExpr(E); } +bool CursorVisitor::VisitObjCEncodeExpr(ObjCEncodeExpr *E) { + return Visit(E->getEncodedTypeSourceInfo()->getTypeLoc()); +} + + bool CursorVisitor::VisitAttributes(Decl *D) { for (const Attr *A = D->getAttrs(); A; A = A->getNext()) if (Visit(MakeCXCursor(A, D, TU))) |