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 cl -- 
libclc/clc/lib/generic/workitem/clc_get_global_id.cl 
libclc/opencl/lib/generic/workitem/get_global_id.cl --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/libclc/clc/lib/generic/workitem/clc_get_global_id.cl 
b/libclc/clc/lib/generic/workitem/clc_get_global_id.cl
index 885f62f5f..515ef7a17 100644
--- a/libclc/clc/lib/generic/workitem/clc_get_global_id.cl
+++ b/libclc/clc/lib/generic/workitem/clc_get_global_id.cl
@@ -6,13 +6,12 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#include <clc/workitem/clc_get_global_offset.h>
+#include <clc/workitem/clc_get_group_id.h>
 #include <clc/workitem/clc_get_local_id.h>
 #include <clc/workitem/clc_get_local_size.h>
-#include <clc/workitem/clc_get_group_id.h>
-#include <clc/workitem/clc_get_global_offset.h>
 
 _CLC_OVERLOAD _CLC_DEF size_t __clc_get_global_id(uint dim) {
-  return __clc_get_group_id(dim) * __clc_get_local_size(dim) + 
__clc_get_local_id(dim) +
-         __clc_get_global_offset(dim);
-
+  return __clc_get_group_id(dim) * __clc_get_local_size(dim) +
+         __clc_get_local_id(dim) + __clc_get_global_offset(dim);
 }

``````````

</details>


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

Reply via email to