Skip to content

Commit d28c07b

Browse files
authored
[clang-scan-deps] Remove const from ModuleDeps loop to enable move. (#161109)
This changes the iteration from const to non-const so that std::move results in a true move rather than a copy.
1 parent 0ab9ffe commit d28c07b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/tools/clang-scan-deps/ClangScanDeps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ class FullDeps {
420420
std::vector<ModuleDeps *> NewMDs;
421421
{
422422
std::unique_lock<std::mutex> ul(Lock);
423-
for (const ModuleDeps &MD : Graph) {
423+
for (ModuleDeps &MD : Graph) {
424424
auto I = Modules.find({MD.ID, 0});
425425
if (I != Modules.end()) {
426426
I->first.InputIndex = std::min(I->first.InputIndex, InputIndex);

0 commit comments

Comments
 (0)