[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>
This commit is contained in:
Behdad Esfahbod authored and GitHub committed 2026-11-08 23:12:49 -06:00
1 parent 71d5df6158
commit 9baef4fc09
1 file changed
+3 -2
+3 -2
View File
@@ -615,9 +615,10 @@ struct KerxSubTableFormat4
}
}
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)