Skip to content

Conversation

@haiyuewa
Copy link
Contributor

The clang-tidy will complain about 'Statement should be inside braces':
if (batch.token) free(batch.token);
if (batch.embd) free(batch.embd);
if (batch.pos) free(batch.pos);
if (batch.n_seq_id) free(batch.n_seq_id);

Make sure to read the contributing guidelines before submitting a PR

@haiyuewa haiyuewa force-pushed the disable-clang-tidy-braces-around-statements branch from 63a2ba9 to 56e36fb Compare September 22, 2025 08:44
The clang-tidy will complain about 'Statement should be inside braces':
    if (batch.token)    free(batch.token);
    if (batch.embd)     free(batch.embd);
    if (batch.pos)      free(batch.pos);
    if (batch.n_seq_id) free(batch.n_seq_id);
@haiyuewa haiyuewa force-pushed the disable-clang-tidy-braces-around-statements branch from 56e36fb to dfbad1f Compare September 22, 2025 15:25
@haiyuewa haiyuewa requested a review from slaren as a code owner September 22, 2025 15:25
@slaren
Copy link
Member

slaren commented Sep 22, 2025

There are a few exceptions, but generally this warning follows the project's code style.

@slaren slaren closed this Sep 22, 2025
@haiyuewa haiyuewa deleted the disable-clang-tidy-braces-around-statements branch September 22, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants