[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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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