summaryrefslogtreecommitdiffstats
path: root/clang
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
commitf676fdc8ea69c117f16f636f7a2b5fcf2907a208 (patch)
treee41ec0950446fa40a7d20c7a78ed2c65657fd28c /clang
parentcbd50c32015fa2f1525f58dc7e0985b1c3b8980e (diff)
downloadbcm5719-llvm-f676fdc8ea69c117f16f636f7a2b5fcf2907a208.tar.gz
bcm5719-llvm-f676fdc8ea69c117f16f636f7a2b5fcf2907a208.zip
One last RandomAccessIterator operator for PreprocessingRecord::iterator
llvm-svn: 135680
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Lex/PreprocessingRecord.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/include/clang/Lex/PreprocessingRecord.h b/clang/include/clang/Lex/PreprocessingRecord.h
index 22ac57152f6..f454ca96cae 100644
--- a/clang/include/clang/Lex/PreprocessingRecord.h
+++ b/clang/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;
OpenPOWER on IntegriCloud