Revert "[Clang] Ignore BTFTag attr if used as a type attribute"
authorYonghong Song <yhs@fb.com>
Mon, 11 Oct 2021 22:34:26 +0000 (15:34 -0700)
committerYonghong Song <yhs@fb.com>
Mon, 11 Oct 2021 22:34:26 +0000 (15:34 -0700)
commitc5fb1a09533ec2ed43a80f39c1592e5ee887ef9e
tree4f6d07c63ea37979e75bae4b2400e61ce7b4b30c
parent1131b1eb3509b47d30a36ea9b42367ab1d7373a2
Revert "[Clang] Ignore BTFTag attr if used as a type attribute"

This reverts commit b875343873a584965daf507d73ff1fe71eab1953.

Per discussion in https://reviews.llvm.org/D111199, instead to make
existing btf_tag attribute as a type-or-decl attribute, we will
make existing btf_tag attribute as a decl only attribute, and
introduce btf_type_tag as a type only attribute. This will make
it easy for cases like typedef where an attribute may be applied
as either a type attribute or a decl attribute.
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/lib/AST/TypePrinter.cpp
clang/lib/Sema/SemaType.cpp
clang/test/Sema/attr-btf_tag.c