Closed as not planned
Closed as not planned
Description
I am running VS Code 1.64.2 on linux, and clang as a part of C/C++ ms-vscode extension (very standard, version 1.10.5, it uses clang 14.0.0 afaik). Using this .clang-format
:
BasedOnStyle: Google
Language: Cpp
IndentWidth: 4
and this (reduced as much as possible) cpp file:
(note 4 spaces on line 4)
Upon formatting on save (the whole file, not just modified lines), this happens:
Line 4 is indented twice (8 spaces). Saving and formatting the file again fixes the indentation (4 spaces). This problem is hard to pinpoint, it disappears upon small changes, for example, empty line before private:
is essential, so is the private:
line itself. On the other hand, I discovered it in a complex piece of code, with several extra lines after the problematic snippet and the following private:
section.