[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

Nicolas van Kempen via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 3 15:09:17 PDT 2025


================
@@ -535,7 +535,7 @@ struct FragmentCompiler {
     }
     if (Filters->empty())
       return std::nullopt;
-    auto Filter = [Filters](llvm::StringRef Path) {
+    auto Filter = [Filters = std::move(Filters)](llvm::StringRef Path) {
       for (auto &Regex : *Filters)
----------------
nicovank wrote:

```suggestion
      for (const auto &Regex : *Filters)
```

Same for both cases in other file.

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


More information about the cfe-commits mailing list