[clang] 4696857 - DeclContext: Fix iterator category
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 16 11:59:59 PDT 2021
Author: Björn Schäpers
Date: 2021-04-16T20:59:36+02:00
New Revision: 46968577336f29ddc5fd30e87cb94b03fa3c9cd9
URL: https://github.com/llvm/llvm-project/commit/46968577336f29ddc5fd30e87cb94b03fa3c9cd9
DIFF: https://github.com/llvm/llvm-project/commit/46968577336f29ddc5fd30e87cb94b03fa3c9cd9.diff
LOG: DeclContext: Fix iterator category
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
Added:
Modified:
clang/include/clang/AST/DeclBase.h
Removed:
################################################################################
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index 084ecb5389cee..482d2889a25a1 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -2378,7 +2378,7 @@ class DeclContext {
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 {
More information about the cfe-commits
mailing list