[llvm-branch-commits] [YAML] Don't validate `Fill::Size` after error (PR #123280)
Vitaly Buka via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 17 16:24:33 PST 2025
================
@@ -1750,7 +1750,9 @@ void MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::mapping(
std::string MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::validate(
IO &io, std::unique_ptr<ELFYAML::Chunk> &C) {
if (const auto *F = dyn_cast<ELFYAML::Fill>(C.get())) {
- if (F->Pattern && F->Pattern->binary_size() != 0 && !F->Size)
+ // Can't check the `Size`, as it's required and may be left uninitialized by
----------------
vitalybuka wrote:
Right, those are just once exposed by check-llvm under msan, but it's a general issue.
Inconvenience is that some Val can not be initialized with `Val = {}',
we need some template magic like for `yamlize`
It's existing behavior, but is any concerns that errors after the first one could be bogus?
Like here, for missing Size, we will print that it `can't be 0` as well.
https://github.com/llvm/llvm-project/pull/123280
More information about the llvm-branch-commits
mailing list