[PATCH] D131046: [clang-tools-extra]Replace find/insert with try_emplace

ppenguin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 01:06:50 PDT 2022


prehistoric-penguin added inline comments.


================
Comment at: clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp:140
+        // This replacement is a duplicate of one suggested by another TU.
+        if (!InsertPos.second) {
           return;
----------------
avogelsgesang wrote:
> Previously, we had an additional check `It->second != SourceTU` here. I don't understand what this check was doing, but this does not seem to be a pure refactoring.
> 
> If this is still an NFC change, please update the commit message to explain why this condition was unneeded
Thanks! I have reviewed the change and fixed it, now the logic is aligned


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131046/new/

https://reviews.llvm.org/D131046



More information about the cfe-commits mailing list