[cfe-commits] r64899 - /cfe/trunk/include/clang/AST/Expr.h

Chris Lattner sabre at nondot.org
Tue Feb 17 22:48:23 PST 2009


Author: lattner
Date: Wed Feb 18 00:48:23 2009
New Revision: 64899

URL: http://llvm.org/viewvc/llvm-project?rev=64899&view=rev
Log:
add iterators for string token locations.

Modified:
    cfe/trunk/include/clang/AST/Expr.h

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=64899&r1=64898&r2=64899&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed Feb 18 00:48:23 2009
@@ -516,6 +516,11 @@
     assert(TokNum < NumConcatenated && "Invalid tok number");
     return TokLocs[TokNum];
   }
+  
+  typedef const SourceLocation *tokloc_iterator;
+  tokloc_iterator tokloc_begin() const { return TokLocs; }
+  tokloc_iterator tokloc_end() const { return TokLocs+NumConcatenated; }
+  
 
   virtual SourceRange getSourceRange() const { 
     return SourceRange(TokLocs[0], TokLocs[NumConcatenated-1]); 





More information about the cfe-commits mailing list