================
@@ -0,0 +1,21 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py 
UTC_ARGS: --version 5
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 -triple amdgcn 
-Wno-unused-value %s
+
+void foo() {
+  int n = 1;
+  __amdgpu_image_rsrc_t v = 0;            // expected-error {{cannot 
initialize a variable of type '__amdgpu_image_rsrc_t' with an rvalue of type 
'int'}}
+  static_cast<__amdgpu_image_rsrc_t>(n); // expected-error {{static_cast from 
'int' to '__amdgpu_image_rsrc_t' is not allowed}}
+  reinterpret_cast<__amdgpu_image_rsrc_t>(n); // expected-error 
{{reinterpret_cast from 'int' to '__amdgpu_image_rsrc_t' is not allowed}}
+  (void)(v + v); // expected-error {{invalid operands}}
+  int x(v);      // expected-error {{cannot initialize a variable of type 
'int' with an lvalue of type '__amdgpu_image_rsrc_t'}}
+  __amdgpu_image_rsrc_t k;
----------------
ranapratap55 wrote:

updated the tests.

https://github.com/llvm/llvm-project/pull/160258
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to