[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 14:50:32 PST 2024


================
@@ -550,9 +555,91 @@ static llvm::IntrusiveRefCntPtr<vfs::OverlayFileSystem> createBaseFS() {
   return BaseFS;
 }
 
+static void recreateOptionsParserIfNeeded(
+    llvm::Expected<CommonOptionsParser> &OptionsParser,
+    llvm::ArrayRef<const char *> Args,
+    const ClangTidyOptions &EffectiveOptions) {
+
+  auto DoubleDashIt = std::find(Args.begin(), Args.end(), StringRef("--"));
----------------
5chmidti wrote:

Use `llvm::find` and `const auto DoubleDashIt`

https://github.com/llvm/llvm-project/pull/66553


More information about the cfe-commits mailing list