diff options
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r-- | include/clang/AST/DeclBase.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 223289123e..e8f57df159 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -1237,8 +1237,8 @@ public: } public: - typedef SpecificDecl* value_type; - typedef SpecificDecl* reference; + typedef SpecificDecl value_type; + typedef SpecificDecl& reference; typedef SpecificDecl* pointer; typedef std::iterator_traits<DeclContext::decl_iterator>::difference_type difference_type; @@ -1258,8 +1258,8 @@ public: SkipToNextDecl(); } - reference operator*() const { return cast<SpecificDecl>(*Current); } - pointer operator->() const { return cast<SpecificDecl>(*Current); } + reference operator*() const { return *cast<SpecificDecl>(*Current); } + pointer operator->() const { return &**this; } specific_decl_iterator& operator++() { ++Current; |