[clang-tools-extra] [clangd] [modules] Avoid building duplicated modules at the same time (PR #114365)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 23:01:42 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 ccdfd1a182fc718997f21583aea95d321f03c967 ed160e18b941bca16a87f0ea400aca2406967ae1 --extensions h,cpp -- clang-tools-extra/clangd/ModulesBuilder.cpp clang-tools-extra/clangd/ModulesBuilder.h clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp b/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
index a6c57acba8..67a2d1d39e 100644
--- a/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
+++ b/clang-tools-extra/clangd/unittests/PrerequisiteModulesTest.cpp
@@ -540,12 +540,13 @@ export int B = 44 + M;
std::unique_ptr<PrerequisiteModules> AInfo, BInfo;
- // Trying to build A and B at the same time and check we will only build module M once.
+ // Trying to build A and B at the same time and check we will only build
+ // module M once.
AsyncTaskRunner ThreadPool;
- ThreadPool.runAsync("A Job", [&] () {
+ ThreadPool.runAsync("A Job", [&]() {
AInfo = Builder.buildPrerequisiteModulesFor(getFullPath("A.cppm"), FS);
});
- ThreadPool.runAsync("B Job", [&] () {
+ ThreadPool.runAsync("B Job", [&]() {
BInfo = Builder.buildPrerequisiteModulesFor(getFullPath("B.cppm"), FS);
});
ThreadPool.wait();
``````````
</details>
https://github.com/llvm/llvm-project/pull/114365
More information about the cfe-commits
mailing list