aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-21 16:37:44 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-21 16:37:44 +0000
commit1a23f12e1e283384b76e768a83f01bfcbbd61ca0 (patch)
treec8500c5bd96036a9df6dfc3885460c921d263d63
parent67029567f7d39d9356fbc505fffc2c1e21bf06ce (diff)
One last RandomAccessIterator operator for PreprocessingRecord::iterator
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135680 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Lex/PreprocessingRecord.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h
index 22ac57152f..f454ca96ca 100644
--- a/include/clang/Lex/PreprocessingRecord.h
+++ b/include/clang/Lex/PreprocessingRecord.h
@@ -419,6 +419,11 @@ namespace clang {
friend difference_type operator-(const iterator &X, const iterator &Y) {
return X.Position - Y.Position;
}
+
+ friend iterator operator-(iterator X, difference_type D) {
+ X.Position -= D;
+ return X;
+ }
};
friend class iterator;