njames93 added a comment.

It may be a pain, but I'd also like to see an option like `RemovePrefix`.
Generally most unscoped enums constants have prefixes based on the enum name. A 
simple way around this would just be to get the longest common prefix in all 
the enums constants. There is probably some other heuristics that could be used 
like maybe stop after you reach an underscore or change of case but probably 
not essential.



================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:82
+
+  Checks for unscoped enumerations.
+
----------------
Could this perhaps be a little more informative?


================
Comment at: 
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-prefer-scoped-enums.rst:35-36
+
+Note: Although ``enum struct`` and ``enum class`` are exactly equivalent, the
+latter is used mainly.
----------------
I'd prefer if this was user controlled, An option like `UseEnumStruct` that 
defaults to false. Just because its mainly used, doesn't mean there aren't some 
projects that prefer to use `enum struct`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85697

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D85697: [clang-tidy] ... Nathan James via Phabricator via cfe-commits

Reply via email to