================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
+
+// Verifying that CThisExpr generation works for sturct fields
+struct Packet {
+    int size;
+    int *data __attribute__((counted_by(size)));
+};
+
+// CHECK: RecordDecl {{.*}} struct Packet definition
+// CHECK: FieldDecl {{.*}} size 'int'
+// CHECK: FieldDecl {{.*}} data 'int * __counted_by(this->size)':'int *'
----------------
hnrklssn wrote:

Asking the room: would there be any issues with these nodes printing as 
`this->size` despite that technically not being valid C, or is that used purely 
for compiler development?

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

Reply via email to