Clang should be agnostic about formatting as per the syntax definition.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
Using the following indentation generates a clang-tidy warning:
if ()
{ if ( )
{
}
else
{
}
}
The C language syntax is completely agnostic about indentation. Enforcement of a particular coding style does not change the semantics of the execution as long as the syntax is satisfied. Stop trying to enforce a coding style.
}
VS Code version: Code 1.136.1 (a44adf7f53e00964ab890f9f8758a334f1fc15bc, 2026-09-03T05:06:41Z)
OS version: Linux x64 6.12.101+deb13-amd64
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|AMD Ryzen 7 3700X 8-Core Processor (16 x 3967)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x1002, DEVICE=0x67ff, DRIVER_VENDOR=Mesa, DRIVER_VERSION=25.0.7 *ACTIVE*
GPU1: VENDOR= 0x1002, DEVICE=0x743f
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgpu: enabled
webgpu_on_vk_via_gl_interop: disabled_off
webnn: disabled_off|
|Load (avg)|0, 0, 0|
|Memory (System)|62.71GB (52.27GB free)|
|Process Argv|--crash-reporter-id 0a3efdd8-8f20-47dc-b779-5d24ae9778ad --crash-reporter-id 0a3efdd8-8f20-47dc-b779-5d24ae9778ad|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|gnome|
|XDG_CURRENT_DESKTOP|GNOME|
|XDG_SESSION_DESKTOP|gnome|
|XDG_SESSION_TYPE|wayland|
Extensions (38)
Name|Identifier|Author|Version
---|---|---|---
PIO ASM Syntax Highlighting|chris-hock.pioasm|chris-hock|1.0.0
npm Intellisense|christian-kohler.npm-intellisense|christian-kohler|1.4.5
Doxygen Documentation Generator|cschlosser.doxdocgen|cschlosser|1.4.0
Arm Assembly|dan-c-underwood.arm|dan-c-underwood|1.7.4
Git History|donjayamanne.githistory|donjayamanne|0.6.20
GitLens — Git supercharged|eamodio.gitlens|eamodio|19.1.0
Cortex-Debug: Device Support Pack - STM32H7|jeandudey.cortex-debug-dp-stm32h7|jeandudey|1.0.0
CMake Language Support|josetr.cmake-language-support-vscode|josetr|0.0.9
clangd|llvm-vs-code-extensions.vscode-clangd|llvm-vs-code-extensions|0.6.0
Cortex-Debug|marus25.cortex-debug|marus25|1.12.1
debug-tracker-vscode|mcu-debug.debug-tracker-vscode|mcu-debug|0.0.15
MemoryView|mcu-debug.memory-view|mcu-debug|0.0.29
Peripheral Viewer|mcu-debug.peripheral-viewer|mcu-debug|1.6.4
RTOS Views|mcu-debug.rtos-views|mcu-debug|0.0.16
.NET Install Tool|ms-dotnettools.vscode-dotnet-runtime|ms-dotnettools|3.1.0
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.37.2026090401
CMake Tools|ms-vscode.cmake-tools|ms-vscode|1.23.52
C/C++ DevTools|ms-vscode.cpp-devtools|ms-vscode|0.6.18
C/C++|ms-vscode.cpptools|ms-vscode|1.33.8
C/C++ Extension Pack|ms-vscode.cpptools-extension-pack|ms-vscode|1.5.1
Hex Editor|ms-vscode.hexeditor|ms-vscode|1.11.1
Makefile Tools|ms-vscode.makefile-tools|ms-vscode|0.12.17
Serial Monitor|ms-vscode.vscode-serial-monitor|ms-vscode|0.13.251128001
Cortex-GDB|onethinx.cortex-gdb|Onethinx|1.0.3
MicroPico|paulober.pico-w-go|paulober|4.3.4
Raspberry Pi Pico|raspberry-pi.raspberry-pi-pico|raspberry-pi|0.22.0
STM32Cube CMake Support|stmicroelectronics.stm32cube-ide-build-cmake|STMicroelectronics|1.46.0
STM32Cube Core|stmicroelectronics.stm32cube-ide-core|STMicroelectronics|1.4.0
STM32Cube Debug Core|stmicroelectronics.stm32cube-ide-debug-core|STMicroelectronics|1.4.0
STM32Cube Debug Generic GDB Server|stmicroelectronics.stm32cube-ide-debug-generic-gdbserver|STMicroelectronics|1.4.0
STM32Cube Debug STLink GDB Server|stmicroelectronics.stm32cube-ide-debug-stlink-gdbserver|STMicroelectronics|1.4.0
vscode-pdf|tomoki1207.pdf|tomoki1207|1.2.2
GNU Linker Map files|trond-snekvik.gnu-mapfiles|trond-snekvik|1.1.0
Doxygen Documentation Generator - With Parameter Direction|zatkins-dev.doxdocgen-with-direction|zatkins-dev|1.5.5
LinkerScript|zixuanwang.linkerscript|ZixuanWang|1.0.4
A/B Experiments
```
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ddidtcf:31399634
ec5jj548:31422691
diffpatch-lysithea-24-production:31579328
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
c9b86496:31447327
capico_axe_098a3278:31576180
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ddid_c:31478207
hmra_i5g22:31518061
l_j1ci3728:31575056
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
a1ije391_t:31540920
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
jf4hg949:31526829
ahp-both-windows:31556933
ihg5j128:31534457
7g2b5551:31542111
sandbox-ui-on-2:31543161
enable_editor_pane_layout:31569726
allow-none:31555437
36h42362:31564511
c7c27ce7:31554789
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
switchtoauto:31559321
maidictation:31565333
0c1h4866:31566224
vrbsty_fls:31561059
session-archive:31558132
5b8j3302:31564601
mangle-name-control:31572633
39a5d156:31574986
2bfb8b39:31576696
permission_prompt_treatment:1332566
ccr_pr_nudge_auto_review:1319472
vsc_wsm_c:1340633
jidc7660:1370295
auto_mode_control:1367906
h5e14506_copy:1348995
cfee5631:1379228
```
Contributor guide
Assessment
This issue has not been assessed yet.