[cfe-commits] r96155 - in /cfe/trunk/tools/CIndex: CIndex.cpp CXSourceLocation.h

Daniel Dunbar daniel at zuster.org
Sun Feb 14 00:31:58 PST 2010


Author: ddunbar
Date: Sun Feb 14 02:31:57 2010
New Revision: 96155

URL: http://llvm.org/viewvc/llvm-project?rev=96155&view=rev
Log:
Rename translateSourceRange(CXSourceRange) translateCXSourceRange, instead of
having overloaded functions with inverse semantics.

Modified:
    cfe/trunk/tools/CIndex/CIndex.cpp
    cfe/trunk/tools/CIndex/CXSourceLocation.h

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=96155&r1=96154&r2=96155&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Sun Feb 14 02:31:57 2010
@@ -339,7 +339,7 @@
 }
 
 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 @@
   // 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 @@
   if (!CXXUnit || !Tokens || !NumTokens)
     return;
   
-  SourceRange R = cxloc::translateSourceRange(Range);
+  SourceRange R = cxloc::translateCXSourceRange(Range);
   if (R.isInvalid())
     return;
   

Modified: cfe/trunk/tools/CIndex/CXSourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CXSourceLocation.h?rev=96155&r1=96154&r2=96155&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CXSourceLocation.h (original)
+++ cfe/trunk/tools/CIndex/CXSourceLocation.h Sun Feb 14 02:31:57 2010
@@ -65,7 +65,7 @@
   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));
 }





More information about the cfe-commits mailing list