[all-commits] [llvm/llvm-project] ccae7b: [clang-format] Improve BlockIndent at ColumnLimit ...
Gedare Bloom via All-commits
all-commits at lists.llvm.org
Wed Jul 24 19:47:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ccae7b461be339e717d02f99ac857cf0bc7d17fc
https://github.com/llvm/llvm-project/commit/ccae7b461be339e717d02f99ac857cf0bc7d17fc
Author: Gedare Bloom <gedare at rtems.org>
Date: 2024-07-24 (Wed, 24 Jul 2024)
Changed paths:
M clang/lib/Format/ContinuationIndenter.cpp
M clang/lib/Format/FormatToken.h
M clang/lib/Format/TokenAnnotator.cpp
M clang/unittests/Format/FormatTest.cpp
M clang/unittests/Format/TokenAnnotatorTest.cpp
Log Message:
-----------
[clang-format] Improve BlockIndent at ColumnLimit (#93140)
Fixes #55731
The reported formatting problems were related to ignoring deep nesting
of "simple" functions (causing #54808) and to allowing the trailing
annotation to become separated from the closing parens, which allowed a
break to occur between the closing parens and the trailing annotation.
The fix for the nesting of "simple" functions is to detect them more
carefully. "Simple" was defined in a comment as being a single
non-expression argument. I tried to stay as close to the original intent
of the implementation while fixing the various bad formatting reports.
In the process of fixing these bugs, some latent bugs were discovered
related to how JavaScript Template Strings are handled. Those are also
fixed here.
---------
Co-authored-by: Owen Pan <owenpiano at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list