[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 <noreply@openai.com> * [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 <noreply@openai.com>
diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index 2187716..8926e7e 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh
@@ -615,9 +615,10 @@ } } + HB_NODISCARD HB_NEVER_INLINE - HB_NODISCARD bool perform_action (hb_buffer_t *buffer, - const Entry<EntryData> &entry) + bool perform_action (hb_buffer_t *buffer, + const Entry<EntryData> &entry) { hb_glyph_position_t &o = buffer->cur_pos(); switch (action_type)