[Openmp-commits] [openmp] [OpenMP] Replace copy and paste code with instantiation (PR #73991)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 30 13:52:41 PST 2023


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 0ec4b82cfddbe0c7c7eb4b3486f55139f56d5f16 13ad6ed1cc49f560e31369411beb6306549ec9c8 -- openmp/libomptarget/include/Shared/PluginAPI.inc openmp/libomptarget/include/PluginManager.h openmp/libomptarget/include/Shared/APITypes.h openmp/libomptarget/include/Shared/PluginAPI.h openmp/libomptarget/include/device.h openmp/libomptarget/include/omptarget.h openmp/libomptarget/src/device.cpp openmp/libomptarget/src/omptarget.cpp openmp/libomptarget/src/rtl.cpp
``````````

</details>

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

``````````diff
diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp
index f574feda62..e80d6e09c4 100644
--- a/openmp/libomptarget/src/rtl.cpp
+++ b/openmp/libomptarget/src/rtl.cpp
@@ -145,10 +145,10 @@ bool PluginAdaptorManagerTy::attemptLoadRTL(const std::string &RTLName, PluginAd
 #undef PLUGIN_API_HANDLE
 
   // Remove plugin on failure to call optional init_plugin
-    int32_t Rc = RTL.init_plugin();
-    if (Rc != OFFLOAD_SUCCESS) {
-      DP("Unable to initialize library '%s': %u!\n", Name, Rc);
-      return false;
+  int32_t Rc = RTL.init_plugin();
+  if (Rc != OFFLOAD_SUCCESS) {
+    DP("Unable to initialize library '%s': %u!\n", Name, Rc);
+    return false;
   }
 
   // No devices are supported by this RTL?

``````````

</details>


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


More information about the Openmp-commits mailing list