From 9baef4fc09866ad3ec65ccead2091bc9787c6a1d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 8 Nov 2026 23:12:49 -0600 Subject: [PATCH] [aat] Place nodiscard before noinline on kerx action helper (#6600) * [aat] Remove nodiscard from kerx perform_action Clang rejects [[nodiscard]] after __declspec(noinline), which is used by HB_NEVER_INLINE on Windows. Remove HB_NODISCARD from the kerx format 4 action helper to fix Chromium's Windows build. Reproduced the failure with Clang 21 and the Windows noinline spelling; the same syntax check passes after the change. meson compile -C build and meson test -C build pass (298 passed, one skipped). Assisted-by: OpenAI Codex * [aat] Restore nodiscard before noinline Place HB_NODISCARD before HB_NEVER_INLINE so [[nodiscard]] precedes __declspec(noinline) on Windows. This preserves the return-value check while avoiding Clang's attribute-ordering error. Check all six action helpers; only kerx format 4 returns a value. Keep the other five helpers' void signatures unchanged. Clang and GCC syntax checks pass in C++11 and C++17. Clang checks using the Windows noinline spelling also pass in C++17 and C++23. The full Meson build passes, with 298 tests passed and one skipped. Assisted-by: OpenAI Codex --- src/hb-aat-layout-kerx-table.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 218771632..8926e7ef8 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -615,9 +615,10 @@ struct KerxSubTableFormat4 } } + HB_NODISCARD HB_NEVER_INLINE - HB_NODISCARD bool perform_action (hb_buffer_t *buffer, - const Entry &entry) + bool perform_action (hb_buffer_t *buffer, + const Entry &entry) { hb_glyph_position_t &o = buffer->cur_pos(); switch (action_type)