[cfe-commits] r96161 - /cfe/trunk/tools/CIndex/CIndex.cpp

Daniel Dunbar daniel at zuster.org
Sun Feb 14 02:02:43 PST 2010


Author: ddunbar
Date: Sun Feb 14 04:02:42 2010
New Revision: 96161

URL: http://llvm.org/viewvc/llvm-project?rev=96161&view=rev
Log:
CIndex: Avoid an unnecessary getLocForEndOfToken call, the region of interest
doesn't need to be a full token.
 - Doug, please review.

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=96161&r1=96160&r2=96161&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Sun Feb 14 04:02:42 2010
@@ -1468,8 +1468,7 @@
   SourceLocation SLoc = cxloc::translateSourceLocation(Loc);
   CXCursor Result = MakeCXCursorInvalid(CXCursor_NoDeclFound);
   if (SLoc.isValid()) {
-    SourceRange RegionOfInterest(SLoc, 
-                       CXXUnit->getPreprocessor().getLocForEndOfToken(SLoc, 1));
+    SourceRange RegionOfInterest(SLoc, SLoc);
     
     // FIXME: Would be great to have a "hint" cursor, then walk from that
     // hint cursor upward until we find a cursor whose source range encloses





More information about the cfe-commits mailing list