diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-08 02:32:26 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-08 02:32:26 +0000 |
commit | b70e7a83ee55e463d52d175bd68dece2bfd084f4 (patch) | |
tree | 7d492303389dd0e924540d095aa58e8a176b52cd /tools/libclang/CIndex.cpp | |
parent | 480760f8c7db7a1b77a73f4833bb99f657802775 (diff) |
[libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 2cfaea442b..9e8b2f4588 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -6397,6 +6397,18 @@ Logger &cxindex::Logger::operator<<(CXTranslationUnit TU) { return *this; } +Logger &cxindex::Logger::operator<<(const FileEntry *FE) { + *this << FE->getName(); + return *this; +} + +Logger &cxindex::Logger::operator<<(CXCursor cursor) { + CXString cursorName = clang_getCursorDisplayName(cursor); + *this << cursorName << "@" << clang_getCursorLocation(cursor); + clang_disposeString(cursorName); + return *this; +} + Logger &cxindex::Logger::operator<<(CXSourceLocation Loc) { CXFile File; unsigned Line, Column; |