================
@@ -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:

I guess I'm not seeing why the driver would provide a more user-friendly error 
message; I think the messages would be the same either way? But if it turns out 
that my suggestion has a poor user experience, I don't insist it only be done 
from the frontend -- I am mostly trying to avoid duplicating the logic for 
checking for a C compilation unit. Everything eventually funnels through the 
frontend, so it seems most reasonable to catch it there instead of from the 
driver.

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