================
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -emit-llvm
-disable-llvm-passes -finclude-default-header -verify %s
+
+Texture2D<float4> t;
+
+void main() {
+ // expected-error@+3 {{'mips_type' is a private member of
'hlsl::Texture2D<>'}}
+ // expected-note@*:* {{implicitly declared private here}}
+ // expected-error@+1 {{intermediate helper type
'Texture2D<float4>::mips_type' cannot be used as a variable}}
+ Texture2D<float4>::mips_type a;
+
+ // expected-error@+3 {{'mips_slice_type' is a private member of
'hlsl::Texture2D<>'}}
+ // expected-note@*:* {{implicitly declared private here}}
+ // expected-error@+1 {{intermediate helper type
'Texture2D<float4>::mips_slice_type' cannot be used as a variable}}
----------------
Keenuts wrote:
Could you add a test with a template? Then we have a template param, your new
error is the only one preventing the user from instantiating a
`mips_slice_type` local variable.
https://github.com/llvm/llvm-project/pull/186143
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits