Repository navigation
Build with Clang in CI and check the verifier with clang-tidy - #131
Open
SwayamInSync wants to merge 10 commits into
Open
SwayamInSync wants to merge 10 commits into
SwayamInSync wants to merge 10 commits into
Conversation
# Conflicts: # website/source/release-notes.rst
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan item T4 (Clang-hosted build and clang-tidy in CI). Linux CI built the verifier only with GCC, which accepts C++20 features in C++17 code without a warning; Apple Clang rejects some of them, and before 0.1.0 that class of code, with code whose result depended on the order of evaluation, failed 53 tests on macOS, found only there.
Change
-DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18); the release job stays on GCC, so each host compiler builds every change once, and macOS builds with Apple Clang as before.clangVerify(-Werror=c++20-extensions,clang/lib/Verify/CMakeLists.txt), locally as in CI.clang-tidy --checks='-*,bugprone-use-after-move' --warnings-as-errors='*'overclang/lib/Verifyandclang/tools/cpp-verify, with the build's own clang-tidy and compilation database.What they found
Compiled with Clang and
-Wc++20-extensions, the verifier's 36 sources have seven warnings, allcaptured structured bindings are a C++20 extension: a lambda capturing a name a structured binding introduced, inPassivize.cpp(two),SubobjectBounds.cpp(one), andVerifier.cpp(four, one loop). Each binding is now a named reference (const auto &Name = Entry.first;), and the files compile with-Werror=c++20-extensions. The open PRs' changed sources (#122, #120, #127, #128, #130, and the probe fix) add none; they contain only these seven, which a merge of this PR fixes.bugprone-use-after-movereports nothing on main. I also ranbugprone-unchecked-optional-accessonce: its 32 reports are all accesses that a check or an invariant guards (for examplerootRegionof a global root always returns a region), so it is not added to CI.Testing
The three files compile with Clang and
-Werror=c++20-extensions(-fsyntax-onlywith the build's flags); this PR's assertions job is the first Clang-hosted build of the whole tree with the step.Docs
Release notes, "Testing".