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 c,cpp --
clang/test/Driver/sycl-c-warn.c clang/lib/Driver/Driver.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/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index f3188cd01..5060c9eb6 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -3155,11 +3155,20 @@ void Driver::BuildInputs(const ToolChain &TC,
DerivedArgList &Args,
if (IsSYCL) {
types::ID OldTy = Ty;
switch (Ty) {
- case types::TY_C: Ty = types::TY_CXX; break;
- case types::TY_CHeader: Ty = types::TY_CXXHeader; break;
- case types::TY_PP_C: Ty = types::TY_PP_CXX; break;
- case types::TY_PP_CHeader: Ty = types::TY_PP_CXXHeader; break;
- default: break;
+ case types::TY_C:
+ Ty = types::TY_CXX;
+ break;
+ case types::TY_CHeader:
+ Ty = types::TY_CXXHeader;
+ break;
+ case types::TY_PP_C:
+ Ty = types::TY_PP_CXX;
+ break;
+ case types::TY_PP_CHeader:
+ Ty = types::TY_PP_CXXHeader;
+ break;
+ default:
+ break;
}
if (OldTy != Ty)
Diag(clang::diag::warn_drv_fsycl_with_c_type)
``````````
</details>
https://github.com/llvm/llvm-project/pull/200318
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits