diff options
Diffstat (limited to 'clang/test/Analysis/Inputs/system-header-simulator-cxx.h')
-rw-r--r-- | clang/test/Analysis/Inputs/system-header-simulator-cxx.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/Analysis/Inputs/system-header-simulator-cxx.h b/clang/test/Analysis/Inputs/system-header-simulator-cxx.h index 30b25b85944..26248a4d1f5 100644 --- a/clang/test/Analysis/Inputs/system-header-simulator-cxx.h +++ b/clang/test/Analysis/Inputs/system-header-simulator-cxx.h @@ -150,7 +150,7 @@ template <typename T, typename Ptr, typename Ref> struct __list_iterator { typedef std::bidirectional_iterator_tag iterator_category; __list_iterator(T* it = 0) : item(it) {} - __list_iterator(const iterator &rhs): item(rhs.base()) {} + __list_iterator(const iterator &rhs): item(rhs.item) {} __list_iterator<T, Ptr, Ref> operator++() { item = item->next; return *this; } __list_iterator<T, Ptr, Ref> operator++(int) { auto tmp = *this; @@ -175,6 +175,9 @@ template <typename T, typename Ptr, typename Ref> struct __list_iterator { const T* &base() const { return item; } + template <typename UT, typename UPtr, typename URef> + friend struct __list_iterator; + private: T* item; }; @@ -190,7 +193,7 @@ template <typename T, typename Ptr, typename Ref> struct __fwdl_iterator { typedef std::forward_iterator_tag iterator_category; __fwdl_iterator(T* it = 0) : item(it) {} - __fwdl_iterator(const iterator &rhs): item(rhs.base()) {} + __fwdl_iterator(const iterator &rhs): item(rhs.item) {} __fwdl_iterator<T, Ptr, Ref> operator++() { item = item->next; return *this; } __fwdl_iterator<T, Ptr, Ref> operator++(int) { auto tmp = *this; @@ -208,6 +211,9 @@ template <typename T, typename Ptr, typename Ref> struct __fwdl_iterator { const T* &base() const { return item; } + template <typename UT, typename UPtr, typename URef> + friend struct __fwdl_iterator; + private: T* item; }; |