mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
This patch adds a .clang-format file to the gdb repository. The resulting reformatting is what I'd describe as "ok but not great". There are a few variances from our normal style, some discussed in comments in the file, and some in the bug. I've somewhat come around to the idea that some ugliness is acceptable, particularly because I regularly see code that's already ugly anyway -- either in formatting or along some other dimension. I don't know of a way to enforce a particular version. I have only tried clang-format 18 with this particular file, though Kevin Buettner reported trying 19-21 as well. I've documented this in the file. I used "AllowShortFunctionsOnASingleLine: InlineOnly" as previously discussed. I feel that the spirit of the GNU style is that vertical space is free, and we should use "None" here. (This goes against something we previously decided on the list, though.) The file is in the root directory for ease of use. For the time being you should not bulk reformat files. I think we should have a flag day for this, but at some later point. See the earlier discussion for details. New in v4: * Comment fixes * Remove ForEachMacros - no longer correct * Remove IncludeCategories - no longer correct New in v5: * More fixes to the comments New in v6: * Removed 'StatementMacros' setting, we're no longer using PyObject_HEAD Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30098 Approved-by: Kevin Buettner <kevinb@redhat.com>
77 lines
637 B
Text
77 lines
637 B
Text
*.diff
|
|
*.patch
|
|
*.orig
|
|
*.rej
|
|
|
|
*~
|
|
.#*
|
|
*#
|
|
.*.swp
|
|
|
|
*.flt
|
|
*.gmo
|
|
*.info
|
|
*.la
|
|
*.lo
|
|
*.o
|
|
*.pyc
|
|
*.tmp
|
|
*.a
|
|
|
|
.deps
|
|
.libs
|
|
|
|
autom4te.cache
|
|
config.cache
|
|
config.h
|
|
config.intl
|
|
config.log
|
|
config.status
|
|
libtool
|
|
POTFILES
|
|
*-POTFILES
|
|
|
|
TAGS
|
|
TAGS.sub
|
|
|
|
.local.vimrc
|
|
.lvimrc
|
|
|
|
.clang-tidy
|
|
.clangd
|
|
.cache
|
|
compile_commands.json
|
|
.vscode
|
|
.devcontainer/
|
|
|
|
.gdbinit
|
|
.gdb_history
|
|
|
|
perf.data
|
|
perf.data.old
|
|
|
|
# gnu global files
|
|
GPATH
|
|
GRTAGS
|
|
GTAGS
|
|
GSYMS
|
|
|
|
# ignore core files, but not java/net/protocol/core/
|
|
core
|
|
!core/
|
|
|
|
lost+found
|
|
|
|
# ignore ./contrib/gcc_update output
|
|
LAST_UPDATED
|
|
REVISION
|
|
|
|
stamp-*
|
|
*.stamp
|
|
|
|
# ignore in-tree prerequisites
|
|
/mpfr*
|
|
/mpc*
|
|
/gmp*
|
|
/isl*
|
|
/gettext*
|