[PATCH] D85697: [clang-tidy] Add cppcoreguidelines-prefer-scoped-enums

János Benjamin Antal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 23:42:15 PDT 2020


janosbenjaminantal added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferScopedEnumsCheck.cpp:91
+  llvm::SmallString<128> Buffer;
+  const StringRef ClassInsertion{"class "};
+
----------------
aaron.ballman wrote:
> janosbenjaminantal wrote:
> > aaron.ballman wrote:
> > > This feels a bit like it's a user option given that `enum struct` is also used. I think using `class` is a sensible default, though.
> > I would like to keep this as small as possible, so I didn't planned to add this option as part of the first version. Do you think it is necessary to add this to approve the review? If yes, then I will add it of course, otherwise maybe in a different review in the future.
> Given that two reviewers both thought it was worthwhile, I think it's probably not a bad idea to support as an option. It could be done in a follow-up patch if that's the way you'd like to proceed, though.
Will implement this. Not sure whether in a follow-up patch or not. If it is just a few lines of code, then I will include here, otherwise I will create a follow-up patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85697



More information about the cfe-commits mailing list