From: Argyrios Kyrtzidis Date: Wed, 7 Sep 2011 21:50:10 +0000 (+0000) Subject: Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3e9a969fd25022805a9e0ad827f3729286f6d58;p=clang Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful to meet the requirements of the InputIterator concept. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139261 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index e12e201e67..7bcc962739 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -336,6 +336,13 @@ namespace clang { return Self->LoadedPreprocessedEntities.end()[Position]; return Self->PreprocessedEntities[Position]; } + + pointer operator->() const { + if (Position < 0) + return &Self->LoadedPreprocessedEntities.end()[Position]; + + return &Self->PreprocessedEntities[Position]; + } reference operator[](difference_type D) { return *(*this + D);