[PATCH] D88859: APINotes: add APINotesYAMLCompiler

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 15:58:31 PDT 2020


compnerd marked an inline comment as done.
compnerd added inline comments.


================
Comment at: clang/include/clang/APINotes/Types.h:25
+/// auditing.
+enum class EnumExtensibilityKind {
+  None,
----------------
martong wrote:
> This seems a bit redundant to `Attrs.td`. I'd prefer to have the structure of an attribute defined only in one place. Why can't we directly reuse the types in the generated `Attrs.inc`? In this case
> ```
> class EnumExtensibilityAttr : public InheritableAttr {
> public:
>   enum Kind {
>     Closed,
>     Open
>   };
> ```
> could perfectly fit, wouldn't it?
The none-case here is not the same as missing - it tracks the explicitly audited case.  I suppose we can change the internal enum case from `None` to `Audited` if you like.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88859/new/

https://reviews.llvm.org/D88859



More information about the cfe-commits mailing list