================
@@ -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.
----------------
AaronBallman wrote:

This RUN line would make more sense in a file with a .cpp extension; the .c 
extension means we already imply `-x c` and so that can be a bit confusing.

What should the frontend behavior be btw? e.g.,
```
// RUN: %clang_cc1 -fsycl -x c %s
```
I presume you also want to reject this despite it not happening from the 
driver? Or do you want to allow cc1 invocations to accept C code and only 
prevent driver executions?

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

Reply via email to