summaryrefslogtreecommitdiff
path: root/src/ir/branch-utils.h
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-12-01 17:27:59 -0800
committerGitHub <noreply@github.com>2022-12-02 01:27:59 +0000
commit197b6da7afe6ec317011800abf9453402e6beaa5 (patch)
tree564ae447dc2af116be8948703da85e8d9198f7c4 /src/ir/branch-utils.h
parentf70bc4d6634c5a0b1aa88f3c073b783e83bb5712 (diff)
downloadbinaryen-197b6da7afe6ec317011800abf9453402e6beaa5.tar.gz
binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.tar.bz2
binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.zip
Use C++17's [[maybe_unused]]. NFC (#5309)
Diffstat (limited to 'src/ir/branch-utils.h')
-rw-r--r--src/ir/branch-utils.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h
index 82a563498..d433a421e 100644
--- a/src/ir/branch-utils.h
+++ b/src/ir/branch-utils.h
@@ -44,9 +44,7 @@ inline bool isBranchReachable(Expression* expr) {
template<typename T> void operateOnScopeNameUses(Expression* expr, T func) {
#define DELEGATE_ID expr->_id
-#define DELEGATE_START(id) \
- auto* cast = expr->cast<id>(); \
- WASM_UNUSED(cast);
+#define DELEGATE_START(id) [[maybe_unused]] auto* cast = expr->cast<id>();
#define DELEGATE_GET_FIELD(id, field) cast->field
@@ -110,9 +108,7 @@ void operateOnScopeNameUsesAndSentValues(Expression* expr, T func) {
template<typename T> void operateOnScopeNameDefs(Expression* expr, T func) {
#define DELEGATE_ID expr->_id
-#define DELEGATE_START(id) \
- auto* cast = expr->cast<id>(); \
- WASM_UNUSED(cast);
+#define DELEGATE_START(id) [[maybe_unused]] auto* cast = expr->cast<id>();
#define DELEGATE_FIELD_SCOPE_NAME_DEF(id, field) func(cast->field)