[all-commits] [llvm/llvm-project] f99072: [Clang][BPF] Add tests for btf_type_tag c2x-style ...
yonghong-song via All-commits
all-commits at lists.llvm.org
Wed Apr 2 07:31:53 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f99072bd8c6b479badfda0a8affd4964b26af4f7
https://github.com/llvm/llvm-project/commit/f99072bd8c6b479badfda0a8affd4964b26af4f7
Author: yonghong-song <yhs at fb.com>
Date: 2025-04-02 (Wed, 02 Apr 2025)
Changed paths:
M clang/test/CodeGen/attr-btf_type_tag-similar-type.c
M clang/test/CodeGen/attr-btf_type_tag-typedef-field.c
Log Message:
-----------
[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
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list