|
30 | 30 | # A compile database that names BMIs explicitly (-fmodule-file=...), which |
31 | 31 | # only a build actually produces: `mcpp build --toolchain llvm@22.1.8` writes |
32 | 32 | # compile_commands.json at the project root. This script does not build it: |
33 | | -# the caller runs that build first (a developer, or ci-linux.yml's LLVM |
34 | | -# toolchain job, which builds mcpp with llvm@20.1.7 before this step). |
35 | | -# check_file_lengths.sh needs no such division because it reads the tree. |
| 33 | +# the caller runs that build first. check_file_lengths.sh needs no such |
| 34 | +# division because it reads the tree. |
| 35 | +# |
| 36 | +# NOT IN CI YET. The only CI job that builds mcpp with clang (ci-linux.yml, |
| 37 | +# "toolchain: musl + llvm", llvm@20.1.7) does not produce a complete build: |
| 38 | +# libc++ 20's `std` module does not make directory_iterator's comparison |
| 39 | +# visible, and that step reads the resolution line rather than the build's |
| 40 | +# exit status. Over the partial database clang-tidy crashes. The gate is wired |
| 41 | +# in once a CI job builds mcpp with clang (mcpp-community/mcpp#729); until |
| 42 | +# then it is run by hand after `mcpp build --toolchain llvm@22.1.8`. |
36 | 43 | # |
37 | 44 | # clang-tidy itself is not part of the plain xim:llvm payload mcpp resolves |
38 | 45 | # for `--toolchain llvm@...` (measured: xim-x-llvm/22.1.8/bin has clang, |
@@ -150,7 +157,10 @@ rc=$? |
150 | 157 | # Only findings inside the decomposition's own directory gate the build: a |
151 | 158 | # bundled third-party header (e.g. modules/libs/src/json/json.hpp) reached |
152 | 159 | # through one of these files' imports is not this decomposition's to fix. |
153 | | -relevant=$(grep "readability-function-size" "$OUT" | grep -F -e "/$DIR/" -e "/$(basename "$PRIMARY")" || true) |
| 160 | +# A finding is a diagnostic line, which ends with the bracketed check name; a |
| 161 | +# crash dump also names the check (in its program arguments) together with |
| 162 | +# every file path, and must not read as a finding. |
| 163 | +relevant=$(grep -E '\[readability-function-size\]$' "$OUT" | grep -F -e "/$DIR/" -e "/$(basename "$PRIMARY")" || true) |
154 | 164 |
|
155 | 165 | if [ -n "$relevant" ]; then |
156 | 166 | echo "$relevant" >&2 |
|
0 commit comments