njames93 added a comment. There are a few reasons for using the virtual method:
- It keeps everything contained in the one class. - In the case where options are needed it avoid extra work in the derived class. - It's consistent with how all base class checks handle the specifics of derived checks. ================ Comment at: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h:62 - // of the language or clang-tidy options. - TransformerClangTidyCheck(transformer::RewriteRule R, StringRef Name, - ClangTidyContext *Context); ---------------- ymandel wrote: > Why delete this? It is the most commonly used constructor and cleaner than > the OOP goop of the virtual method. I'll add that back in, but I feel this constructor is no different in most cases to just placing the rule builder in the virtual method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80697/new/ https://reviews.llvm.org/D80697 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits