[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 04:26:57 PDT 2023
HazardyKnusperkeks added a comment.
If you limit it to `Never` I don't see any value in the differentiation. You could just always use `Custom` (by dropping the custom and only having the nested options).
But I think having at least the `Always` option would be nice. If you want **always** to have a space and you set everything by hand to true, someone comes along and adds a new option (which then is defaulted to `false`) you don't get what you want.
================
Comment at: clang/lib/Format/Format.cpp:1035
IO.mapOptional("SpaceInEmptyBlock", Style.SpaceInEmptyBlock);
- IO.mapOptional("SpaceInEmptyParentheses", Style.SpaceInEmptyParentheses);
IO.mapOptional("SpacesBeforeTrailingComments",
----------------
MyDeveloperDay wrote:
> By removing the old options don’t you break everyone’s clang format file
You need to parse all of the old options, and map them to the new one, if and only if the old one(s) is/are set and the new is not! See below for the other deprecated options.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155239/new/
https://reviews.llvm.org/D155239
More information about the cfe-commits
mailing list