[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 21 10:04:11 PDT 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
I like the direction of this, thank you! LGTM with a small suggestion, but you should wait a few days in case one of the other reviewers has 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();
+};
----------------
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?
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