[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)
Ding Fei via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 5 22:39:00 PDT 2023
================
@@ -209,14 +212,16 @@ void IncludeCleanerCheck::check(const MatchFinder::MatchResult &Result) {
// main file.
if (auto Replacement =
HeaderIncludes.insert(llvm::StringRef{Spelling}.trim("\"<>"),
----------------
danix800 wrote:
`HeaderIncludes` is NOT a container. This `insert` means to create a `tooling::Replacement` object rather than container insertion/emplacing.
https://github.com/llvm/llvm-project/pull/65431
More information about the cfe-commits
mailing list