llvm-project/clang/test/SemaOpenMP/amdgpu-image-rsrc.cpp
Rana Pratap Reddy 27fa1d0cf9
[AMDGPU] Add a new builtin type for image descriptor rsrc (#160258)
Adding a new builtin type for AMDGPU's image descriptor rsrc data type

This requires for https://github.com/llvm/llvm-project/pull/140210
2025-09-29 20:24:59 +05:30

13 lines
569 B
C++

// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -Wno-unused-value %s
void foo() {
#pragma omp target
{
int n = 5;
__amdgpu_texture_t v = 0; // expected-error {{cannot initialize a variable of type '__amdgpu_texture_t' with an rvalue of type 'int'}}
(void)(v + v); // expected-error {{invalid operands to binary expression}}
}
}