aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-14 08:31:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-14 08:31:57 +0000
commit85b988fdfa6adab6d43e16efd19ad4f3f7e2b49b (patch)
tree988db15e9e9be700d06905676af666faa63119d3
parent181cc3df6e0046a154a8a174d551d57af4561998 (diff)
Rename translateSourceRange(CXSourceRange) translateCXSourceRange, instead of
having overloaded functions with inverse semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96155 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/CIndex/CIndex.cpp6
-rw-r--r--tools/CIndex/CXSourceLocation.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index b7f028d8ae..4525e4f05d 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -339,7 +339,7 @@ RangeComparisonResult CursorVisitor::CompareRegionOfInterest(SourceRange R) {
}
RangeComparisonResult CursorVisitor::CompareRegionOfInterest(CXSourceRange CXR) {
- return CompareRegionOfInterest(cxloc::translateSourceRange(CXR));
+ return CompareRegionOfInterest(cxloc::translateCXSourceRange(CXR));
}
/// \brief Visit the given cursor and, if requested by the visitor,
@@ -370,7 +370,7 @@ bool CursorVisitor::Visit(CXCursor Cursor, bool CheckedRegionOfInterest) {
// we're done.
if (RegionOfInterest.isValid() && !CheckedRegionOfInterest) {
CXSourceRange Range = clang_getCursorExtent(Cursor);
- if (cxloc::translateSourceRange(Range).isInvalid() ||
+ if (cxloc::translateCXSourceRange(Range).isInvalid() ||
CompareRegionOfInterest(Range))
return false;
}
@@ -2003,7 +2003,7 @@ void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range,
if (!CXXUnit || !Tokens || !NumTokens)
return;
- SourceRange R = cxloc::translateSourceRange(Range);
+ SourceRange R = cxloc::translateCXSourceRange(Range);
if (R.isInvalid())
return;
diff --git a/tools/CIndex/CXSourceLocation.h b/tools/CIndex/CXSourceLocation.h
index 1efe4c6ee6..8bfc6f9da7 100644
--- a/tools/CIndex/CXSourceLocation.h
+++ b/tools/CIndex/CXSourceLocation.h
@@ -65,7 +65,7 @@ static inline SourceLocation translateSourceLocation(CXSourceLocation L) {
return SourceLocation::getFromRawEncoding(L.int_data);
}
-static inline SourceRange translateSourceRange(CXSourceRange R) {
+static inline SourceRange translateCXSourceRange(CXSourceRange R) {
return SourceRange(SourceLocation::getFromRawEncoding(R.begin_int_data),
SourceLocation::getFromRawEncoding(R.end_int_data));
}