diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-02-14 08:32:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-14 08:32:05 +0000 |
commit | f408f32aa9ae3d97bc656267dc5d78fa7d03499b (patch) | |
tree | 12a62ba9c329e5b9df07dbb1253168b1e1dbee61 | |
parent | 85b988fdfa6adab6d43e16efd19ad4f3f7e2b49b (diff) |
CIndex: Inline CompareRegionOfInterest(CXSourceRange) into sole caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96156 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/CIndex/CIndex.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp index 4525e4f05d..bd897d9eb3 100644 --- a/tools/CIndex/CIndex.cpp +++ b/tools/CIndex/CIndex.cpp @@ -238,12 +238,6 @@ class CursorVisitor : public DeclVisitor<CursorVisitor, bool>, /// \param R a source range retrieved from the abstract syntax tree. RangeComparisonResult CompareRegionOfInterest(SourceRange R); - /// \brief Determine whether this particular source range comes before, comes - /// after, or overlaps the region of interest. - /// - /// \param CXR a source range retrieved from a cursor. - RangeComparisonResult CompareRegionOfInterest(CXSourceRange CXR); - public: CursorVisitor(ASTUnit *TU, CXCursorVisitor Visitor, CXClientData ClientData, unsigned MaxPCHLevel, @@ -338,10 +332,6 @@ RangeComparisonResult CursorVisitor::CompareRegionOfInterest(SourceRange R) { return RangeCompare(TU->getSourceManager(), R, RegionOfInterest); } -RangeComparisonResult CursorVisitor::CompareRegionOfInterest(CXSourceRange CXR) { - return CompareRegionOfInterest(cxloc::translateCXSourceRange(CXR)); -} - /// \brief Visit the given cursor and, if requested by the visitor, /// its children. /// @@ -369,9 +359,9 @@ bool CursorVisitor::Visit(CXCursor Cursor, bool CheckedRegionOfInterest) { // If we have a range of interest, and this cursor doesn't intersect with it, // we're done. if (RegionOfInterest.isValid() && !CheckedRegionOfInterest) { - CXSourceRange Range = clang_getCursorExtent(Cursor); - if (cxloc::translateCXSourceRange(Range).isInvalid() || - CompareRegionOfInterest(Range)) + SourceRange Range = + cxloc::translateCXSourceRange(clang_getCursorExtent(Cursor)); + if (Range.isInvalid() || CompareRegionOfInterest(Range)) return false; } |