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

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 07:54:11 PST 2020


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 isLanguageVersionSupported(const LangOptions &LangOpts) const final {
    return LangOpts.CPlusPlus && additionalLanguageConstraints(LangOpts);
  }

However I'm not a huge fan of that extra boilerplate


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75441





More information about the cfe-commits mailing list