[libcxx-commits] [PATCH] D141241: [libc++] Add clang-tidy to the list of possible substitutions for %{clang-tidy}

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 12 10:30:04 PST 2023


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxx/utils/libcxx/test/features.py:23-24
+  try:
+    if runScriptExitCode(cfg, ['stat %{test-tools}/clang_tidy_checks/libcxx-tidy.plugin']) != 0:
+      return ''
+
----------------



================
Comment at: libcxx/utils/libcxx/test/features.py:33
+  except ConfigurationRuntimeError:
+    return ''
+
----------------



================
Comment at: libcxx/utils/libcxx/test/features.py:159
           # TODO This should be the last stable release.
-          when=lambda cfg: runScriptExitCode(cfg, ['clang-tidy-16 --version']) == 0 and
-                           runScriptExitCode(cfg, ['stat %{test-tools}/clang_tidy_checks/libcxx-tidy.plugin']) == 0,
-          actions=[AddSubstitution('%{clang-tidy}', 'clang-tidy-16')]),
+          when=lambda cfg: _getSuitableClangTidy(cfg) != '',
+          actions=[AddSubstitution('%{clang-tidy}', lambda cfg: _getSuitableClangTidy(cfg))]),
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141241



More information about the libcxx-commits mailing list