diff --git a/test/vast/Dialect/HighLevel/counted_by-a.c b/test/vast/Dialect/HighLevel/counted_by-a.c new file mode 100644 index 0000000000..83786b75be --- /dev/null +++ b/test/vast/Dialect/HighLevel/counted_by-a.c @@ -0,0 +1,11 @@ +// RUN: %vast-front -vast-emit-mlir=hl %s -o - | %file-check %s +// RUN: %vast-front -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - +struct bar; + +struct foo { + unsigned int count; + char other; + // CHECK: hl.field @array : !hl.count_attributed + struct bar *array[] __attribute__((counted_by(count))); +}; + diff --git a/test/vast/Dialect/HighLevel/macro_qualified-a.c b/test/vast/Dialect/HighLevel/macro_qualified-a.c new file mode 100644 index 0000000000..0d7e8c1eb3 --- /dev/null +++ b/test/vast/Dialect/HighLevel/macro_qualified-a.c @@ -0,0 +1,5 @@ +// RUN: %vast-front -vast-emit-mlir=hl %s -o - | %file-check %s +// RUN: %vast-front -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - +#define CDECL __attribute__((cdecl)) +// CHECK: !hl.ptr> +typedef void (CDECL *X)();