[clang-tools-extra] [modularize] Avoid repeated hash lookups (NFC) (PR #109508)

via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 21 09:16:34 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 0cab475d1126305dc1bbb2ba269e40d704dfb90f 39dea55ef4af49f1d855d78a70a5b5f535e44405 --extensions cpp -- clang-tools-extra/modularize/Modularize.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index 9dda405a39..2c00c76c85 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -509,8 +509,7 @@ public:
       llvm::sort(H->second);
 
       // Record this header and its contents if we haven't seen it before.
-      auto [KnownH, Inserted] =
-          AllHeaderContents.insert(*H);
+      auto [KnownH, Inserted] = AllHeaderContents.insert(*H);
       if (Inserted)
         continue;
 

``````````

</details>


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


More information about the cfe-commits mailing list