diff --git a/clang/tools/clang-refactor/TestSupport.cpp b/clang/tools/clang-refactor/TestSupport.cpp index 8b6e250b3632d0..82376fa5d247f4 100644 --- a/clang/tools/clang-refactor/TestSupport.cpp +++ b/clang/tools/clang-refactor/TestSupport.cpp @@ -373,10 +373,7 @@ findTestSelectionRanges(StringRef Filename) { EndOffset = Offset; } TestSelectionRange Range = {Offset, EndOffset}; - auto It = GroupedRanges.insert(std::make_pair( - Matches[1].str(), SmallVector{Range})); - if (!It.second) - It.first->second.push_back(Range); + GroupedRanges[Matches[1].str()].push_back(Range); } if (GroupedRanges.empty()) { llvm::errs() << "error: -selection=test:" << Filename