llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Naveen Seth Hanig (naveen-seth)

<details>
<summary>Changes</summary>

This changes the iteration from const to non-const so that std::move results in 
a true move rather than a copy.

---
Full diff: https://github.com/llvm/llvm-project/pull/161109.diff


1 Files Affected:

- (modified) clang/tools/clang-scan-deps/ClangScanDeps.cpp (+1-1) 


``````````diff
diff --git a/clang/tools/clang-scan-deps/ClangScanDeps.cpp 
b/clang/tools/clang-scan-deps/ClangScanDeps.cpp
index 0e2758d123edc..e41f4eb7999ae 100644
--- a/clang/tools/clang-scan-deps/ClangScanDeps.cpp
+++ b/clang/tools/clang-scan-deps/ClangScanDeps.cpp
@@ -420,7 +420,7 @@ class FullDeps {
     std::vector<ModuleDeps *> NewMDs;
     {
       std::unique_lock<std::mutex> ul(Lock);
-      for (const ModuleDeps &MD : Graph) {
+      for (ModuleDeps &MD : Graph) {
         auto I = Modules.find({MD.ID, 0});
         if (I != Modules.end()) {
           I->first.InputIndex = std::min(I->first.InputIndex, InputIndex);

``````````

</details>


https://github.com/llvm/llvm-project/pull/161109
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to