Display 'static_assert failed: message' instead of
'static_assert failed "message"' to be consistent
with other implementations and be slightly more
readable.
Details
- Reviewers
aaron.ballman philnik Mordante - Group Reviewers
Restricted Project - Commits
- rGda1609ad7354: Improve the formatting of static_assert messages
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I agree with the changes in principle, but it looks like the libc++ precommit CI builder is failing with a bunch of failures... but those failures look like the precommit CI isn't testing the Clang built by the patch?
error: 'error' diagnostics expected but not seen: File * Line * (directive at /home/libcxx-builder/.buildkite-agent/builds/5d14e636cf69-1/llvm-project/libcxx-ci/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp:22): static_assert failed due to requirement '1ULL == 0 || 1ULL < 1ULL': linear_congruential_engine invalid parameters File * Line * (directive at /home/libcxx-builder/.buildkite-agent/builds/5d14e636cf69-1/llvm-project/libcxx-ci/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp:24): static_assert failed due to requirement '1ULL == 0 || 1ULL < 1ULL': linear_congruential_engine invalid parameters File * Line * (directive at /home/libcxx-builder/.buildkite-agent/builds/5d14e636cf69-1/llvm-project/libcxx-ci/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp:27): static_assert failed due to requirement 'is_unsigned<int>::value': _UIntType must be unsigned type error: 'error' diagnostics seen but not expected: Line 218: static_assert failed due to requirement '1ULL == 0 || 1ULL < 1ULL' "linear_congruential_engine invalid parameters" Line 217: static_assert failed due to requirement '1ULL == 0 || 1ULL < 1ULL' "linear_congruential_engine invalid parameters" Line 219: static_assert failed due to requirement 'is_unsigned<int>::value' "_UIntType must be unsigned type" 6 errors generated.
So I *think* this LG, but am not certain what will happen when you land it. I think the precommit CI failures are not failures that will happen when testing against the just-built clang.
Sorry I missed that. You have to changes the libc++ tests to regex checks to allow both error-styles. This can then be removed once we drop support for LLVM 14 (so after the release of LLVM 16).
Most Linux runner use the apt.llvm.org nightly builds and are updated on an irregular interval. The Bootstrapping build will use the just-built Clang. So when the CI is green all should be fine.
I wanted to suggest a regex, but I see the latest patch already does that.
Thanks for improving the readability of the diagnostics! LGTM when the CI passes.
@philnik There seems to be an unrelated clang-format issue but otherwise the build looks fine now.