DeclContext: Fix iterator category
authorBjörn Schäpers <bjoern@hazardy.de>
Thu, 15 Apr 2021 18:49:46 +0000 (20:49 +0200)
committerBjörn Schäpers <bjoern@hazardy.de>
Fri, 16 Apr 2021 18:59:36 +0000 (20:59 +0200)
This amends 0cb7e7ca0c864e052bf49978f3bcd667c9e16930.
The iterator category of lookup_iterator was changed, but here it stayed
hardcoded as random access. Found while trying to build Clazy.

Differential-Revision: https://reviews.llvm.org/D100590

clang/include/clang/AST/DeclBase.h

index 084ecb5..482d288 100644 (file)
@@ -2378,7 +2378,7 @@ public:
 
   using udir_iterator_base =
       llvm::iterator_adaptor_base<udir_iterator, lookup_iterator,
-                                  std::random_access_iterator_tag,
+                                  typename lookup_iterator::iterator_category,
                                   UsingDirectiveDecl *>;
 
   struct udir_iterator : udir_iterator_base {