[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D75441#1901071 , @gribozavr2 wrote: > > I think my preference is to go with isLanguageVersionSupported() and not > > use base classes. > > +1, I can see this working, but the introduction of new concepts does not > seem like

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. I suppose the only other way would be having another virtual function like inside the helper classes virtual bool additionalLanguageConstraints(const LangOptions& LangOpts) const { return true; } bool

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. > I think my preference is to go with isLanguageVersionSupported() and not use > base classes. +1, I can see this working, but the introduction of new concepts does not seem like it pulls its weight given the tiny amount of boilerplate that they eliminate.

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:210 + using ClangTidyCheck::ClangTidyCheck; + bool isLanguageVersionSupported(const LangOptions ) const final { +return LangOpts.C99; The `final` means that one

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:224 +/// Helper class for clang-tidy checks that only register when in `c++11` mode. +class Cpp11ClangTidyCheck : public ClangTidyCheck { + using

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh, lebedev.ri, Eugene.Zelenko. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75441 Files: