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

My concern is that SYCL compiler developers will assume it's *not possible* to 
get C inputs and implement SYCL with those implicit assumptions despite the 
assumptions being false. 

IMO, either C is a valid input language for SYCL and should be supported or 
it's not a valid input language and we should be able to assert that when 
`LangOpts.SYCL` is enabled, `LangOpts.CPlusPlus` is as well so we don't force 
maintainers to think about "what happens with this C-only constructs in SYCL?".

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