diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 8cf456409..e7e1d7fd5 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -493,8 +493,7 @@ void FunctionValidator::noteLabelName(Name name) { if (!name.is()) { return; } - bool inserted; - std::tie(std::ignore, inserted) = labelNames.insert(name); + auto [_, inserted] = labelNames.insert(name); shouldBeTrue( inserted, name, @@ -2870,9 +2869,7 @@ static void validateBinaryenIR(Module& wasm, ValidationInfo& info) { } // check if a node is a duplicate - expressions must not be seen more than // once - bool inserted; - std::tie(std::ignore, inserted) = seen.insert(curr); - if (!inserted) { + if (!seen.insert(curr).second) { std::ostringstream ss; ss << "expression seen more than once in the tree in " << scope << " on " << curr << '\n'; |