[libcxx] [llvm] [libc++][CI] Reenables clang-tidy. (PR #90077)
Mark de Wever via llvm-commits
llvm-commits at lists.llvm.org
Sat May 4 11:59:48 PDT 2024
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/90077
>From ef088e73d3335a1c175c7db674dd289a6a76c92c Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Thu, 25 Apr 2024 18:12:23 +0200
Subject: [PATCH 1/3] [libc++][CI] Reenables clang-tidy.
This is currently a test patch; locally clang-tidy seems to be used in
the Docker image.
---
.github/workflows/libcxx-build-and-test.yaml | 156 ------------------
libcxx/test/CMakeLists.txt | 4 +
.../tools/clang_tidy_checks/CMakeLists.txt | 2 -
libcxx/utils/libcxx/test/params.py | 4 +
4 files changed, 8 insertions(+), 158 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 44a3d79c72c0ac..f03c9f506712c5 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -55,16 +55,10 @@ jobs:
fail-fast: false
matrix:
config: [
- 'generic-cxx03',
'generic-cxx26',
- 'generic-modules'
]
cc: [ 'clang-19' ]
cxx: [ 'clang++-19' ]
- include:
- - config: 'generic-gcc'
- cc: 'gcc-13'
- cxx: 'g++-13'
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}.${{ matrix.cxx }}
@@ -82,153 +76,3 @@ jobs:
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
- stage2:
- if: github.repository_owner == 'llvm'
- runs-on: libcxx-runners-8-set
- needs: [ stage1 ]
- continue-on-error: false
- strategy:
- fail-fast: false
- matrix:
- config: [
- 'generic-cxx11',
- 'generic-cxx14',
- 'generic-cxx17',
- 'generic-cxx20',
- 'generic-cxx23'
- ]
- cc: [ 'clang-19' ]
- cxx: [ 'clang++-19' ]
- include:
- - config: 'generic-gcc-cxx11'
- cc: 'gcc-13'
- cxx: 'g++-13'
- - config: 'generic-cxx23'
- cc: 'clang-17'
- cxx: 'clang++-17'
- - config: 'generic-cxx26'
- cc: 'clang-18'
- cxx: 'clang++-18'
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
- if: always() # Upload artifacts even if the build or test suite fails
- with:
- name: ${{ matrix.config }}-${{ matrix.cxx }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
- stage3:
- if: github.repository_owner == 'llvm'
- needs: [ stage1, stage2 ]
- continue-on-error: false
- strategy:
- fail-fast: false
- max-parallel: 8
- matrix:
- config: [
- 'generic-abi-unstable',
- 'generic-hardening-mode-debug',
- 'generic-hardening-mode-extensive',
- 'generic-hardening-mode-fast',
- 'generic-hardening-mode-fast-with-abi-breaks',
- 'generic-merged',
- 'generic-modules-lsv',
- 'generic-no-exceptions',
- 'generic-no-experimental',
- 'generic-no-filesystem',
- 'generic-no-localization',
- 'generic-no-random_device',
- 'generic-no-threads',
- 'generic-no-tzdb',
- 'generic-no-unicode',
- 'generic-no-wide-characters',
- 'generic-no-rtti',
- 'generic-optimized-speed',
- 'generic-static',
- # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
- # or don't provide much value since the benchmark run results are too noise on the bots.
- 'benchmarks',
- 'bootstrapping-build'
- ]
- machine: [ 'libcxx-runners-8-set' ]
- include:
- - config: 'generic-cxx26'
- machine: libcxx-runners-8-set
- - config: 'generic-asan'
- machine: libcxx-runners-8-set
- - config: 'generic-tsan'
- machine: libcxx-runners-8-set
- - config: 'generic-ubsan'
- machine: libcxx-runners-8-set
- # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
- - config: 'generic-msan'
- machine: libcxx-runners-8-set
- runs-on: ${{ matrix.machine }}
- steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: clang-19
- CXX: clang++-19
- - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
- if: always()
- with:
- name: ${{ matrix.config }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
- windows:
- runs-on: windows-2022
- needs: [ stage1 ]
- strategy:
- fail-fast: false
- matrix:
- include:
- - { config: clang-cl-dll, mingw: false }
- - { config: clang-cl-static, mingw: false }
- - { config: clang-cl-no-vcruntime, mingw: false }
- - { config: clang-cl-debug, mingw: false }
- - { config: clang-cl-static-crt, mingw: false }
- - { config: mingw-dll, mingw: true }
- - { config: mingw-static, mingw: true }
- - { config: mingw-dll-i686, mingw: true }
- steps:
- - uses: actions/checkout at v4
- - name: Install dependencies
- run: |
- choco install -y ninja wget
- pip install psutil
- - name: Install a current LLVM
- if: ${{ matrix.mingw != true }}
- run: |
- choco install -y llvm --version=17.0.6
- - name: Install llvm-mingw
- if: ${{ matrix.mingw == true }}
- run: |
- curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
- powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
- del llvm-mingw*.zip
- mv llvm-mingw* c:\llvm-mingw
- echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- - name: Add Git Bash to the path
- run: |
- echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- - name: Set up the MSVC dev environment
- if: ${{ matrix.mingw != true }}
- uses: ilammy/msvc-dev-cmd at v1
- - name: Build and test
- run: |
- bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index e0d3a0dbc40031..25d5b6c783fbec 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -1,5 +1,8 @@
include(HandleLitArguments)
add_subdirectory(tools)
+if(TARGET cxx-tidy)
+ list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
+endif()
# By default, libcxx and libcxxabi share a library directory.
if (NOT LIBCXX_CXX_ABI_LIBRARY_PATH)
@@ -73,6 +76,7 @@ if (LIBCXX_INCLUDE_TESTS)
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
MAIN_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py")
+ MESSAGE("XXX ${LIBCXX_TEST_DEPS}")
add_custom_target(cxx-test-depends
DEPENDS cxx ${LIBCXX_TEST_DEPS}
COMMENT "Builds dependencies required to run the test suite.")
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 28eed614458336..734569b2f5af4b 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -88,5 +88,3 @@ set_target_properties(cxx-tidy PROPERTIES
set_target_properties(cxx-tidy PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_SHARED_MODULE_SUFFIX_CXX .plugin) # Use a portable suffix to simplify how we can find it from Lit
-
-list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index c2d294e49f4884..83a84d6f50cd8d 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -126,6 +126,7 @@ def getSuitableClangTidy(cfg):
)
!= 0
):
+ print("CLANG-TIDY: no plugin")
return None
version = "{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(
@@ -135,8 +136,11 @@ def getSuitableClangTidy(cfg):
cfg, version, "clang-tidy-{__clang_major__}".format(**compilerMacros(cfg))
)
+ print(f"CLANG-TIDY: version={version} exe={exe}")
+
if not exe:
exe = testClangTidy(cfg, version, "clang-tidy")
+ print(f"CLANG-TIDY: new exe={exe}")
return exe
>From 57c28c782887e0bc7ff5064b5387fe4f19aa3c5f Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Fri, 26 Apr 2024 18:24:12 +0200
Subject: [PATCH 2/3] Updates the patch and remove debug informatiom.
---
.github/workflows/libcxx-build-and-test.yaml | 156 +++++++++++++++++++
libcxx/test/CMakeLists.txt | 4 +-
libcxx/utils/libcxx/test/params.py | 4 -
3 files changed, 159 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index f03c9f506712c5..44a3d79c72c0ac 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -55,10 +55,16 @@ jobs:
fail-fast: false
matrix:
config: [
+ 'generic-cxx03',
'generic-cxx26',
+ 'generic-modules'
]
cc: [ 'clang-19' ]
cxx: [ 'clang++-19' ]
+ include:
+ - config: 'generic-gcc'
+ cc: 'gcc-13'
+ cxx: 'g++-13'
steps:
- uses: actions/checkout at v4
- name: ${{ matrix.config }}.${{ matrix.cxx }}
@@ -76,3 +82,153 @@ jobs:
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
+ stage2:
+ if: github.repository_owner == 'llvm'
+ runs-on: libcxx-runners-8-set
+ needs: [ stage1 ]
+ continue-on-error: false
+ strategy:
+ fail-fast: false
+ matrix:
+ config: [
+ 'generic-cxx11',
+ 'generic-cxx14',
+ 'generic-cxx17',
+ 'generic-cxx20',
+ 'generic-cxx23'
+ ]
+ cc: [ 'clang-19' ]
+ cxx: [ 'clang++-19' ]
+ include:
+ - config: 'generic-gcc-cxx11'
+ cc: 'gcc-13'
+ cxx: 'g++-13'
+ - config: 'generic-cxx23'
+ cc: 'clang-17'
+ cxx: 'clang++-17'
+ - config: 'generic-cxx26'
+ cc: 'clang-18'
+ cxx: 'clang++-18'
+ steps:
+ - uses: actions/checkout at v4
+ - name: ${{ matrix.config }}
+ run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ env:
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+ - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
+ if: always() # Upload artifacts even if the build or test suite fails
+ with:
+ name: ${{ matrix.config }}-${{ matrix.cxx }}-results
+ path: |
+ **/test-results.xml
+ **/*.abilist
+ **/CMakeError.log
+ **/CMakeOutput.log
+ **/crash_diagnostics/*
+ stage3:
+ if: github.repository_owner == 'llvm'
+ needs: [ stage1, stage2 ]
+ continue-on-error: false
+ strategy:
+ fail-fast: false
+ max-parallel: 8
+ matrix:
+ config: [
+ 'generic-abi-unstable',
+ 'generic-hardening-mode-debug',
+ 'generic-hardening-mode-extensive',
+ 'generic-hardening-mode-fast',
+ 'generic-hardening-mode-fast-with-abi-breaks',
+ 'generic-merged',
+ 'generic-modules-lsv',
+ 'generic-no-exceptions',
+ 'generic-no-experimental',
+ 'generic-no-filesystem',
+ 'generic-no-localization',
+ 'generic-no-random_device',
+ 'generic-no-threads',
+ 'generic-no-tzdb',
+ 'generic-no-unicode',
+ 'generic-no-wide-characters',
+ 'generic-no-rtti',
+ 'generic-optimized-speed',
+ 'generic-static',
+ # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
+ # or don't provide much value since the benchmark run results are too noise on the bots.
+ 'benchmarks',
+ 'bootstrapping-build'
+ ]
+ machine: [ 'libcxx-runners-8-set' ]
+ include:
+ - config: 'generic-cxx26'
+ machine: libcxx-runners-8-set
+ - config: 'generic-asan'
+ machine: libcxx-runners-8-set
+ - config: 'generic-tsan'
+ machine: libcxx-runners-8-set
+ - config: 'generic-ubsan'
+ machine: libcxx-runners-8-set
+ # Use a larger machine for MSAN to avoid timeout and memory allocation issues.
+ - config: 'generic-msan'
+ machine: libcxx-runners-8-set
+ runs-on: ${{ matrix.machine }}
+ steps:
+ - uses: actions/checkout at v4
+ - name: ${{ matrix.config }}
+ run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ env:
+ CC: clang-19
+ CXX: clang++-19
+ - uses: actions/upload-artifact at 26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
+ if: always()
+ with:
+ name: ${{ matrix.config }}-results
+ path: |
+ **/test-results.xml
+ **/*.abilist
+ **/CMakeError.log
+ **/CMakeOutput.log
+ **/crash_diagnostics/*
+ windows:
+ runs-on: windows-2022
+ needs: [ stage1 ]
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - { config: clang-cl-dll, mingw: false }
+ - { config: clang-cl-static, mingw: false }
+ - { config: clang-cl-no-vcruntime, mingw: false }
+ - { config: clang-cl-debug, mingw: false }
+ - { config: clang-cl-static-crt, mingw: false }
+ - { config: mingw-dll, mingw: true }
+ - { config: mingw-static, mingw: true }
+ - { config: mingw-dll-i686, mingw: true }
+ steps:
+ - uses: actions/checkout at v4
+ - name: Install dependencies
+ run: |
+ choco install -y ninja wget
+ pip install psutil
+ - name: Install a current LLVM
+ if: ${{ matrix.mingw != true }}
+ run: |
+ choco install -y llvm --version=17.0.6
+ - name: Install llvm-mingw
+ if: ${{ matrix.mingw == true }}
+ run: |
+ curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
+ powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
+ del llvm-mingw*.zip
+ mv llvm-mingw* c:\llvm-mingw
+ echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
+ - name: Add Git Bash to the path
+ run: |
+ echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
+ - name: Set up the MSVC dev environment
+ if: ${{ matrix.mingw != true }}
+ uses: ilammy/msvc-dev-cmd at v1
+ - name: Build and test
+ run: |
+ bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index 25d5b6c783fbec..fd57aa9fe8b375 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -1,5 +1,8 @@
include(HandleLitArguments)
add_subdirectory(tools)
+# When the tools add clang-tidy support, the dependencies need to be updated.
+# This cannot be done in the tools CMakeLists.txt since that does not update
+# the status in this (a parent) directory.
if(TARGET cxx-tidy)
list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
endif()
@@ -76,7 +79,6 @@ if (LIBCXX_INCLUDE_TESTS)
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
MAIN_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py")
- MESSAGE("XXX ${LIBCXX_TEST_DEPS}")
add_custom_target(cxx-test-depends
DEPENDS cxx ${LIBCXX_TEST_DEPS}
COMMENT "Builds dependencies required to run the test suite.")
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 83a84d6f50cd8d..c2d294e49f4884 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -126,7 +126,6 @@ def getSuitableClangTidy(cfg):
)
!= 0
):
- print("CLANG-TIDY: no plugin")
return None
version = "{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}".format(
@@ -136,11 +135,8 @@ def getSuitableClangTidy(cfg):
cfg, version, "clang-tidy-{__clang_major__}".format(**compilerMacros(cfg))
)
- print(f"CLANG-TIDY: version={version} exe={exe}")
-
if not exe:
exe = testClangTidy(cfg, version, "clang-tidy")
- print(f"CLANG-TIDY: new exe={exe}")
return exe
>From 957efd810ec01e162891e3c0717ffa12af5e3068 Mon Sep 17 00:00:00 2001
From: Mark de Wever <koraq at xs4all.nl>
Date: Wed, 1 May 2024 19:20:31 +0200
Subject: [PATCH 3/3] More fixes.
---
libcxx/modules/std/chrono.inc | 6 +++++-
libcxx/modules/std/ranges.inc | 7 ++++---
libcxx/test/libcxx/clang_tidy.gen.py | 3 +++
.../tools/clang_tidy_checks/CMakeLists.txt | 20 +++++++++++++++++++
4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/libcxx/modules/std/chrono.inc b/libcxx/modules/std/chrono.inc
index 1265e21dc54ef6..aa275a112e0f01 100644
--- a/libcxx/modules/std/chrono.inc
+++ b/libcxx/modules/std/chrono.inc
@@ -213,11 +213,15 @@ export namespace std {
using std::chrono::ambiguous_local_time;
using std::chrono::nonexistent_local_time;
# endif // if 0
+#endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&
+ // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
// [time.zone.info], information classes
using std::chrono::local_info;
using std::chrono::sys_info;
+#if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
+ !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# if 0
// [time.zone.timezone], class time_zone
using std::chrono::choose;
@@ -248,7 +252,7 @@ export namespace std {
# endif
# endif // _LIBCPP_ENABLE_EXPERIMENTAL
#endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&
- // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+ // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
} // namespace chrono
diff --git a/libcxx/modules/std/ranges.inc b/libcxx/modules/std/ranges.inc
index 80f31c79a1a405..f71efe948ede10 100644
--- a/libcxx/modules/std/ranges.inc
+++ b/libcxx/modules/std/ranges.inc
@@ -138,9 +138,6 @@ export namespace std {
}
#endif // _LIBCPP_HAS_NO_LOCALIZATION
-#if _LIBCPP_STD_VER >= 23
- // [range.adaptor.object], range adaptor objects
- using std::ranges::range_adaptor_closure;
// Note: This declaration not in the synopsis or explicitly in the wording.
// However it is needed for the range adaptors.
// [range.adaptor.object]/3
@@ -151,7 +148,11 @@ export namespace std {
// involving an object of type cv D as an operand to the | operator is
// undefined if overload resolution selects a program-defined operator|
// function.
+ // This is used internally in C++20 mode.
using std::ranges::operator|;
+#if _LIBCPP_STD_VER >= 23
+ // [range.adaptor.object], range adaptor objects
+ using std::ranges::range_adaptor_closure;
#endif
// [range.all], all view
diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py
index 19b6a999df6073..8419a6f4637c52 100644
--- a/libcxx/test/libcxx/clang_tidy.gen.py
+++ b/libcxx/test/libcxx/clang_tidy.gen.py
@@ -24,6 +24,9 @@
// The GCC compiler flags are not always compatible with clang-tidy.
// UNSUPPORTED{BLOCKLIT}: gcc
+// Clang 17 has false positives.
+// UNSUPPORTED{BLOCKLIT}: clang-17
+
{lit_header_restrictions.get(header, '')}
// TODO: run clang-tidy with modules enabled once they are supported
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 734569b2f5af4b..aa5c2a0a1d9007 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -64,6 +64,26 @@ if(NOT HAS_CLANG_TIDY_HEADERS)
"clang-tidy headers are not present.")
return()
endif()
+
+# The clangTidy plugin uses C++20, when using stdlibc++ verify the version is correct.
+# Note it has not been tested whether version 11 works.
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test.cpp" "
+#include <version>
+#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 12
+ # error The stdlibc++ version is too old.
+#endif
+int main(){}
+")
+try_compile(HAS_NEWER_STANDARD_LIBRARY
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}/test.cpp"
+ LINK_LIBRARIES clangTidy)
+
+if(NOT HAS_NEWER_STANDARD_LIBRARY)
+ message(STATUS "Clang-tidy tests are disabled due to using "
+ "stdlibc++ older than version 12")
+ return()
+endif()
message(STATUS "Clang-tidy tests are enabled.")
set(SOURCES
More information about the llvm-commits
mailing list