================
@@ -635,6 +635,11 @@ static bool FixupInvocation(CompilerInvocation &Invocation,
Diags.Report(diag::err_drv_argument_not_allowed_with) << "-fsycl-is-device"
<< "-fsycl-is-host";
+ // SYCL requires C++; reject C inputs on both device and host.
+ if ((LangOpts.SYCLIsDevice || LangOpts.SYCLIsHost) && !LangOpts.CPlusPlus)
+ Diags.Report(diag::err_drv_argument_not_allowed_with)
----------------
AaronBallman wrote:
This is following the same pattern as surrounding code, but I do wonder if
these diagnostics are declared in the correct diagnostics file. e.g. this is
in DiagnosticDriverKinds.td but we've got DiagnosticFrontendKinds.td.
Nothing to fix for this PR because this is following existing patterns.
https://github.com/llvm/llvm-project/pull/200318
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits