Skip to content

[GPU][CLANG-TIDY] Enable readability-braces-around-statements - #37208

Open
allnes wants to merge 1 commit into
openvinotoolkit:masterfrom
allnes:an/gpu-clang-tidy-braces
Open

[GPU][CLANG-TIDY] Enable readability-braces-around-statements#37208
allnes wants to merge 1 commit into
openvinotoolkit:masterfrom
allnes:an/gpu-clang-tidy-braces

Conversation

@allnes

@allnes allnes commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Enables the readability-braces-around-statements check (with ShortStatementLines set to 1, matching the CPU plugin) for the Intel GPU plugin and wraps single-statement if/else/for/while/do bodies in braces. Most changes are the mechanical brace insertion; a number of guard clauses whose body is the DO_NOT_USE_THIS_KERNEL(...) macro are wrapped by hand since the check does not offer an automatic fix for macro bodies. The copyright header of a few touched files is corrected in passing so the copyright CI check stays green. Next check in the incremental clang-tidy rollout for the plugin.

@github-actions github-actions Bot added the category: GPU OpenVINO GPU plugin label Aug 3, 2026
@allnes
allnes marked this pull request as ready for review August 3, 2026 15:50
@allnes
allnes requested review from a team as code owners August 3, 2026 15:50
@allnes
allnes force-pushed the an/gpu-clang-tidy-braces branch 2 times, most recently from c7d8b14 to dd33c96 Compare August 3, 2026 16:23
@allnes
allnes marked this pull request as draft August 3, 2026 16:23
@allnes
allnes force-pushed the an/gpu-clang-tidy-braces branch from dd33c96 to 0fc17e4 Compare August 3, 2026 17:05
@maxnick maxnick added this to the 2026.4 milestone Aug 3, 2026
@allnes
allnes marked this pull request as ready for review August 3, 2026 17:28
@allnes
allnes force-pushed the an/gpu-clang-tidy-braces branch from 0fc17e4 to e0dc69f Compare August 3, 2026 17:42
@allnes
allnes marked this pull request as draft August 3, 2026 17:43
@allnes
allnes marked this pull request as ready for review August 3, 2026 17:46
@allnes
allnes requested a review from maxnick August 3, 2026 18:44

@p-durandin p-durandin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as pattern modifications

@p-durandin
p-durandin enabled auto-merge August 4, 2026 06:24
@allnes
allnes disabled auto-merge August 4, 2026 07:59
@allnes
allnes force-pushed the an/gpu-clang-tidy-braces branch 3 times, most recently from cd2f760 to 0dbaf8c Compare August 6, 2026 15:29
Enables readability-braces-around-statements (ShortStatementLines=1) for the
Intel GPU plugin and adds braces to single-statement control-flow bodies.
Macro-body sites (DO_NOT_USE_THIS_KERNEL) that clang-tidy cannot rewrite were
braced by hand. Next check in the incremental clang-tidy rollout for the plugin.
@allnes
allnes force-pushed the an/gpu-clang-tidy-braces branch from 0dbaf8c to 180bea0 Compare August 7, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GPU OpenVINO GPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants