mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
Actually we can just inline the base typedef and use the injected class name for the base class.
llvm-svn: 227765
This commit is contained in:
parent
04ec7e316b
commit
06e0f5a784
@ -382,20 +382,18 @@ namespace clang {
|
||||
/// \brief Iterator adaptor that turns an iterator over canonical QualTypes
|
||||
/// into an iterator over CanQualTypes.
|
||||
template <typename InputIterator>
|
||||
class CanTypeIterator
|
||||
: public llvm::iterator_adaptor_base<
|
||||
struct CanTypeIterator
|
||||
: llvm::iterator_adaptor_base<
|
||||
CanTypeIterator<InputIterator>, InputIterator,
|
||||
typename std::iterator_traits<InputIterator>::iterator_category,
|
||||
CanQualType,
|
||||
typename std::iterator_traits<InputIterator>::difference_type,
|
||||
CanProxy<Type>, CanQualType> {
|
||||
typedef typename CanTypeIterator::iterator_adaptor_base BaseT;
|
||||
|
||||
public:
|
||||
CanTypeIterator() {}
|
||||
explicit CanTypeIterator(InputIterator Iter) : BaseT(std::move(Iter)) {}
|
||||
explicit CanTypeIterator(InputIterator Iter)
|
||||
: CanTypeIterator::iterator_adaptor_base(std::move(Iter)) {}
|
||||
|
||||
CanQualType operator*() const { return CanQualType::CreateUnsafe(*BaseT::I); }
|
||||
CanQualType operator*() const { return CanQualType::CreateUnsafe(*this->I); }
|
||||
CanProxy<Type> operator->() const;
|
||||
};
|
||||
|
||||
|
@ -552,23 +552,20 @@ protected:
|
||||
|
||||
template <typename EntryType, typename SETraits = SpecEntryTraits<EntryType>,
|
||||
typename DeclType = typename SETraits::DeclType>
|
||||
class SpecIterator
|
||||
: public llvm::iterator_adaptor_base<
|
||||
struct SpecIterator
|
||||
: llvm::iterator_adaptor_base<
|
||||
SpecIterator<EntryType, SETraits, DeclType>,
|
||||
typename llvm::FoldingSetVector<EntryType>::iterator,
|
||||
typename std::iterator_traits<typename llvm::FoldingSetVector<
|
||||
EntryType>::iterator>::iterator_category,
|
||||
DeclType *, ptrdiff_t, DeclType *, DeclType *> {
|
||||
typedef typename SpecIterator::iterator_adaptor_base BaseT;
|
||||
|
||||
public:
|
||||
SpecIterator() {}
|
||||
explicit SpecIterator(
|
||||
typename llvm::FoldingSetVector<EntryType>::iterator SetIter)
|
||||
: BaseT(std::move(SetIter)) {}
|
||||
: SpecIterator::iterator_adaptor_base(std::move(SetIter)) {}
|
||||
|
||||
DeclType *operator*() const {
|
||||
return SETraits::getMostRecentDecl(&*BaseT::I);
|
||||
return SETraits::getMostRecentDecl(&*this->I);
|
||||
}
|
||||
DeclType *operator->() const { return **this; }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user