[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 22:17:50 PDT 2023


================
@@ -209,14 +212,16 @@ void IncludeCleanerCheck::check(const MatchFinder::MatchResult &Result) {
     // main file.
     if (auto Replacement =
             HeaderIncludes.insert(llvm::StringRef{Spelling}.trim("\"<>"),
----------------
PiotrZSL wrote:

insert -> emplace

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


More information about the cfe-commits mailing list