[flang][cuda] Use nullptr for comparison (#140767)

Comparison without explicit nullptr seems to bring false positives. Use
explicit nullptr.
This commit is contained in:
Valentin Clement (バレンタイン クレメン)
2025-05-20 11:04:06 -07:00
committed by GitHub
parent a9ee8e4a45
commit c17ae161fd

View File

@@ -150,7 +150,7 @@ void *CUFAllocDevice(std::size_t sizeInBytes, std::int64_t *asyncObject) {
CUDA_REPORT_IF_ERROR(
cudaMallocManaged((void **)&p, sizeInBytes, cudaMemAttachGlobal));
} else {
if (asyncObject == kNoAsyncObject) {
if (asyncObject == nullptr) {
CUDA_REPORT_IF_ERROR(cudaMalloc(&p, sizeInBytes));
} else {
CUDA_REPORT_IF_ERROR(