summaryrefslogtreecommitdiffstats
path: root/include/clang/Sema/Lookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/Lookup.h')
-rw-r--r--include/clang/Sema/Lookup.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h
index 1c6c7bb..5bfee8b 100644
--- a/include/clang/Sema/Lookup.h
+++ b/include/clang/Sema/Lookup.h
@@ -291,9 +291,6 @@ public:
if (!D->isHidden())
return true;
- if (SemaRef.ActiveTemplateInstantiations.empty())
- return false;
-
// During template instantiation, we can refer to hidden declarations, if
// they were visible in any module along the path of instantiation.
return isVisibleSlow(SemaRef, D);
@@ -735,22 +732,18 @@ public:
}
class iterator
- : public std::iterator<std::forward_iterator_tag, NamedDecl *> {
- typedef llvm::DenseMap<NamedDecl*,NamedDecl*>::iterator inner_iterator;
- inner_iterator iter;
-
+ : public llvm::iterator_adaptor_base<
+ iterator, llvm::DenseMap<NamedDecl *, NamedDecl *>::iterator,
+ std::forward_iterator_tag, NamedDecl *> {
friend class ADLResult;
- iterator(const inner_iterator &iter) : iter(iter) {}
- public:
- iterator() {}
- iterator &operator++() { ++iter; return *this; }
- iterator operator++(int) { return iterator(iter++); }
+ iterator(llvm::DenseMap<NamedDecl *, NamedDecl *>::iterator Iter)
+ : iterator_adaptor_base(std::move(Iter)) {}
- value_type operator*() const { return iter->second; }
+ public:
+ iterator() {}
- bool operator==(const iterator &other) const { return iter == other.iter; }
- bool operator!=(const iterator &other) const { return iter != other.iter; }
+ value_type operator*() const { return I->second; }
};
iterator begin() { return iterator(Decls.begin()); }
OpenPOWER on IntegriCloud