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 origin/main HEAD --extensions cpp,h -- 
clang/include/clang/DependencyScanning/DependencyScannerImpl.h 
clang/include/clang/DependencyScanning/ModuleDepCollector.h 
clang/include/clang/Tooling/DependencyScanningTool.h 
clang/lib/DependencyScanning/DependencyScannerImpl.cpp 
clang/lib/DependencyScanning/ModuleDepCollector.cpp 
clang/lib/Tooling/DependencyScanningTool.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/clang/lib/DependencyScanning/ModuleDepCollector.cpp 
b/clang/lib/DependencyScanning/ModuleDepCollector.cpp
index 51d2008ba..4e8172619 100644
--- a/clang/lib/DependencyScanning/ModuleDepCollector.cpp
+++ b/clang/lib/DependencyScanning/ModuleDepCollector.cpp
@@ -671,14 +671,14 @@ void ModuleDepCollector::run(DependencyConsumer 
&Consumer) {
   llvm::DenseSet<serialization::ModuleFile *> HandledModuleDependencies;
   std::function<void(serialization::ModuleFile *)> HandleModuleDependency =
       [&](serialization::ModuleFile *MF) {
-    if (HandledModuleDependencies.insert(MF).second) {
-      for (serialization::ModuleFile *MFI : MF->Imports)
-        HandleModuleDependency(MFI);
-      auto It = MDC.ModularDeps.find(MF);
-      if (It != MDC.ModularDeps.end())
-        Consumer.handleModuleDependency(*It->second);
-    }
-  };
+        if (HandledModuleDependencies.insert(MF).second) {
+          for (serialization::ModuleFile *MFI : MF->Imports)
+            HandleModuleDependency(MFI);
+          auto It = MDC.ModularDeps.find(MF);
+          if (It != MDC.ModularDeps.end())
+            Consumer.handleModuleDependency(*It->second);
+        }
+      };
 
   for (serialization::ModuleFile *MF : MDC.DirectModularDeps)
     HandleModuleDependency(MF);

``````````

</details>


https://github.com/llvm/llvm-project/pull/197961
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to