[PATCH] D75340: [clang-tidy] Change checks to use new isLanguageVersionSupported restriction

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 02:18:37 PST 2020


njames93 planned changes to this revision.
njames93 added a comment.

Made another pull request that could neaten this implementation up - https://reviews.llvm.org/D75441, will wait to see how that goes down before getting this pushed.



================
Comment at: clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h:30
+  bool isLanguageVersionSupported(const LangOptions &LangOpts) const override {
+    return LangOpts.CPlusPlus && !LangOpts.CPlusPlus17;
+  }
----------------
gribozavr2 wrote:
> I think CPlusPlus17 implies CPlusPlus.
This is saying it needs c++ but not c++17, so c++98->c++14 are Ok but not 17 or 20. Besides this is the current behaviour in the cpp file


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75340





More information about the cfe-commits mailing list