[clang] [clang] Document the type_visibility attribute (PR #79157)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 13:51:30 PST 2024


================
@@ -3220,8 +3220,8 @@ def TypeVisibility : InheritableAttr {
   let Args = [EnumArgument<"Visibility", "VisibilityType",
                            ["default", "hidden", "internal", "protected"],
                            ["Default", "Hidden", "Hidden", "Protected"]>];
-//  let Subjects = [Tag, ObjCInterface, Namespace];
-  let Documentation = [Undocumented];
+  let Subjects = SubjectList<[Tag, ObjCInterface, Namespace], ErrorDiag>;
----------------
AaronBallman wrote:

I would separate out this change because it's not really related to documenting the attribute (this is used to generate automatic checks for the subject, so it corresponds to this code that was manually written and can possibly be removed: https://github.com/llvm/llvm-project/blob/091fc81d485594d4b751c10518230769c905430c/clang/lib/Sema/SemaDeclAttr.cpp#L2917)

https://github.com/llvm/llvm-project/pull/79157


More information about the cfe-commits mailing list