[cfe-commits] r96156 - /cfe/trunk/tools/CIndex/CIndex.cpp
Daniel Dunbar
daniel at zuster.org
Sun Feb 14 00:32:05 PST 2010
Author: ddunbar
Date: Sun Feb 14 02:32:05 2010
New Revision: 96156
URL: http://llvm.org/viewvc/llvm-project?rev=96156&view=rev
Log:
CIndex: Inline CompareRegionOfInterest(CXSourceRange) into sole caller.
Modified:
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=96156&r1=96155&r2=96156&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Sun Feb 14 02:32:05 2010
@@ -238,12 +238,6 @@
/// \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 @@
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 @@
// 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;
}
More information about the cfe-commits
mailing list