[flang-commits] [flang] [flang][CUDA] Clarify host and device call diagnostics (PR #232850)
Andre Kuhlenschmidt via flang-commits
flang-commits at lists.llvm.org
Fri Oct 16 16:07:33 PDT 2026
================
@@ -193,24 +193,28 @@ struct DeviceExprChecker
CallContext callContext_;
private:
- static Result CallError(
- const evaluate::ProcedureDesignator &proc, bool inHostCode) {
+ Result CallError(
+ const evaluate::ProcedureDesignator &proc, bool inHostCode) const {
+ const char *procedureType{inHostCode ? "DEVICE" : "HOST"};
+ const char *codeContext{callContext_ == CallContext::HostDevice
+ ? "HOST,DEVICE code without a guard using ON_DEVICE() from the "
+ "CUDADEVICE module"
----------------
akuhlens wrote:
This isn't any advice here. The error message has the constraints of the error. One of the constraints can't be satisfied, but that doesn't mean it shouldn't be included.
https://github.com/llvm/llvm-project/pull/232850
More information about the flang-commits
mailing list