================
@@ -0,0 +1,68 @@
+//===--- UseRangesCheck.h - clang-tidy --------------------------*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_USERANGESCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_USERANGESCHECK_H
+
+#include "../ClangTidyCheck.h"
+#include "IncludeInserter.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/Expr.h"
+#include "clang/Basic/Diagnostic.h"
+#include "llvm/ADT/IntrusiveRefCntPtr.h"
+#include "llvm/ADT/StringMap.h"
+
+namespace clang::tidy::utils {
+
+/// Base class for handling converting std iterator algorithms to a range
+/// equivalent.
+class UseRangesCheck : public ClangTidyCheck {
+public:
+  struct Indexes {
+    enum Replace { First, Second };
+    unsigned BeginArg;
+    unsigned EndArg = BeginArg + 1;
+    Replace ReplaceArg = First;
+  };
----------------
5chmidti wrote:

It's possible to remove all uses of the `Replace` enum and `ReplaceArg`. The 
only uses of them were in `utils/UseRanges.cpp`, but no `Indexes` got it's 
`ReplaceArg` set to `Second`.

https://github.com/llvm/llvm-project/pull/97764
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to