[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 21 11:07:52 PDT 2020


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:31-32
+template <class T> struct OptionEnumMapping {
+  // Must provide:
+  // static ArrayRef<std::pair<T, StringRef>> getEnumMapping();
+};
----------------
aaron.ballman wrote:
> Any reason not to do:
> ```
> static ArrayRef<std::pair<T, StringRef>> getEnumMapping() = delete;
> ```
> so you get a nice error if you instantiate something without the required definition?
I need to read the c++ standard, never even realised you could delete static functions like that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82188





More information about the cfe-commits mailing list