[clang-pseudo] Forest.h - don't inherit from std::iterator

Now that we've updated to C++17 MSVC gives very verbose warnings about not creating classes that inherit from std::iterator - use llvm::iterator_facade_base instead

Fixes #57005
This commit is contained in:
Simon Pilgrim 2022-08-09 10:18:40 +01:00
parent 15eaefa5fe
commit d9e5462da6
1 changed files with 3 additions and 1 deletions

View File

@ -199,7 +199,9 @@ private:
};
class ForestNode::RecursiveIterator
: public std::iterator<std::input_iterator_tag, const ForestNode> {
: public llvm::iterator_facade_base<ForestNode::RecursiveIterator,
std::input_iterator_tag,
const ForestNode> {
llvm::DenseSet<const ForestNode *> Seen;
struct StackFrame {
const ForestNode *Parent;