Implement PreprocessingRecord's and LazyVector's iterators on top of iterator_adaptor...
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 15 Mar 2015 15:27:19 +0000 (15:27 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 15 Mar 2015 15:27:19 +0000 (15:27 +0000)
commit15b9717873cf7c791baa9bd40c244d54cf672df1
tree387135b78e0d931ad8d8dffe731846c7b3db0c4e
parentbc46b939e647b9ded4ccad7de7694b388369291a
Implement PreprocessingRecord's and LazyVector's iterators on top of iterator_adaptor_base

This basically creates a wrapper around an 'int' that poses as an iterator.
While that looks a bit counter-intuitive it works just fine because iterator
operations and basic integer arithmetic works in exactly the same way.

Remove the manual integer wrapping code and reduce the reliance on iterator
internals in the implementation. No functionality change intended.

llvm-svn: 232322
clang/include/clang/AST/ExternalASTSource.h
clang/include/clang/Lex/PreprocessingRecord.h
clang/lib/Lex/PreprocessingRecord.cpp