]> granicus.if.org Git - clang/commitdiff
add iterators for string token locations.
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 06:48:23 +0000 (06:48 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 06:48:23 +0000 (06:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64899 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index 54167c9c377ff6548f6029415d38d3cb98ac448c..ffdd996cedccec945c1fbc17d7bb641c5f2a6c6a 100644 (file)
@@ -516,6 +516,11 @@ public:
     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]);