llvm-project
f99072bd - [Clang][BPF] Add tests for btf_type_tag c2x-style attributes (#133666)

Commit
256 days ago
[Clang][BPF] Add tests for btf_type_tag c2x-style attributes (#133666) For btf_type_tag implementation, in order to have the same results with clang (__attribute__((btf_type_tag("...")))), gcc intends to use c2x syntax '[[...]]'. Clang also supports similar c2x syntax. Currently, the clang selftest contains the following five tests: ``` attr-btf_type_tag-func.c attr-btf_type_tag-similar-type.c attr-btf_type_tag-var.c attr-btf_type_tag-func-ptr.c attr-btf_type_tag-typedef-field.c ``` Tests attr-btf_type_tag-func.c and attr-btf_type_tag-var.c already have c2x syntax test. Test attr-btf_type_tag-func-ptr.c does not support c2x syntax when '__attribute__((...))' is replaced with with '[[...]]'. This should not be an issue since we do not have use cases for function pointer yet. This patch added '[[...]]' syntax for ``` attr-btf_type_tag-similar-type.c attr-btf_type_tag-typedef-field.c ```
Author
Parents
Loading