[clang] [Driver][SYCL] Error on C inputs when compiling with -fsycl (PR #200318)

Michael Toguchi via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 3 15:48:57 PDT 2026


================
@@ -0,0 +1,7 @@
+// Verify that a .c file compiled with -fsycl is an error.
+// RUN: not %clang -### -fsycl %s 2>&1 | FileCheck -check-prefix ERR %s
+// ERR: error: invalid argument '{{.*}}sycl-c-warn.c' not allowed with '-fsycl'
+
+// Verify that explicitly forcing -x c with -fsycl is also an error.
----------------
mdtoguchi wrote:

I wouldn't expect the ability to capture this behavior with the `-cc1` command line be useful.  If the user is already using `-cc1` directly, any issues with expected source type would be pretty low on the totem pole for useful functionality when involving `-fsycl`.

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


More information about the cfe-commits mailing list