================
@@ -1,16 +1,25 @@
 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o 
- %s | FileCheck %s
 
 // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}} struct MyBuffer definition
-// CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:6:3, col:68> col:68 h 
'__hlsl_resource_t {{\[\[}}hlsl::resource_class(UAV)]] 
{{\[\[}}hlsl::is_rov]]':'__hlsl_resource_t'
+// CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 5]]:3, col:68> col:68 h 
'__hlsl_resource_t
+// CHECK-SAME{LITERAL}: hlsl::resource_class(UAV)]]
+// CHECK-SAME{LITERAL}: hlsl::is_rov]]
+// CHECK-SAME: ':'__hlsl_resource_t'
 struct MyBuffer {
   __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::is_rov]] h;
 };
 
-// CHECK: VarDecl 0x{{[0-9a-f]+}} <line:10:1, col:66> col:66 res 
'__hlsl_resource_t {{\[\[}}hlsl::resource_class(SRV)]] 
{{\[\[}}hlsl::is_rov]]':'__hlsl_resource_t'
+// CHECK: VarDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:1, col:66> col:66 res 
'__hlsl_resource_t
+// CHECK-SAME{LITERAL}: hlsl::resource_class(SRV)]]
+// CHECK-SAME{LITERAL}: hlsl::is_rov]]
+// CHECK-SAME: ':'__hlsl_resource_t'
 __hlsl_resource_t [[hlsl::is_rov]] [[hlsl::resource_class(SRV)]] res;
 
-// CHECK: FunctionDecl 0x{{[0-9a-f]+}} <line:14:1, line:16:1> line:14:6 f 
'void ()
-// CHECK: VarDecl 0x{{[0-9a-f]+}} <col:3, col:72> col:72 r '__hlsl_resource_t 
{{\[\[}}hlsl::resource_class(Sampler)]] 
{{\[\[}}hlsl::is_rov]]':'__hlsl_resource_t'
+// CHECK: FunctionDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 5]]:1, line:[[# @LINE 
+ 7]]:1> line:[[# @LINE + 5]]:6 f 'void ()
+// CHECK: VarDecl 0x{{[0-9a-f]+}} <col:3, col:72> col:72 r '__hlsl_resource_t
+// CHECK-SAME{LITERAL}: hlsl::resource_class(Sampler)]]
----------------
python3kgae wrote:

Why some time we check with the `[[` like `[[hlsl::resource_class(Sampler)]]`, 
sometime don't?

https://github.com/llvm/llvm-project/pull/108919
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to