Author: Simon Pilgrim
Date: 2022-08-09T10:18:53+01:00
New Revision: d9e5462da61c3e2137a21a868a36f7022a39b59e

URL: 
https://github.com/llvm/llvm-project/commit/d9e5462da61c3e2137a21a868a36f7022a39b59e
DIFF: 
https://github.com/llvm/llvm-project/commit/d9e5462da61c3e2137a21a868a36f7022a39b59e.diff

LOG: [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

Added: 
    

Modified: 
    clang-tools-extra/pseudo/include/clang-pseudo/Forest.h

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h 
b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
index ef9a222faf6bf..130cf1ac7ef1a 100644
--- a/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
+++ b/clang-tools-extra/pseudo/include/clang-pseudo/Forest.h
@@ -199,7 +199,9 @@ class ForestArena {
 };
 
 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;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to