[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-25 Thread Christian Rayroud via Phabricator via cfe-commits
crayroud added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3170 + // to add a space only before the first one + bool IsFirstLParen = true; + const FormatToken *Tok = Right.Previous; I will simplify the following using Left.is(T

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:3422 ///true: false: - ///for (auto v : values) {} vs. for(auto v: values) {} + ///for (auto v : values) {} vs. for (aut

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Fundamentally this looks ok to me, the biggest concern is fathoming out the change in TokenAnnotator.cpp to mean the same thing, but I think that is what the tests should be for I think. One think I do is use the output of this https://clang.llvm.org/docs/ClangF

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-22 Thread Christian Rayroud via Phabricator via cfe-commits
crayroud added inline comments. Comment at: clang/include/clang/Format/Format.h:3422 ///true: false: - ///for (auto v : values) {} vs. for(auto v: values) {} + ///for (auto v : values) {} vs. for (auto v: value

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:3341 +/// \endcode +bool AfterFunctionDeclarationName; +/// If ``true``, put a space between function definition name and opening Could you sort these? AfterCont

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Fundamentally this looks ok to me, the biggest concern is fathoming out the change in TokenAnnotator.cpp to mean the same thing, but I think that is what the tests should be for I think. One think I do is use the output of this https://clang.llvm.org/docs/ClangF

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-21 Thread Christian Rayroud via Phabricator via cfe-commits
crayroud updated this revision to Diff 381168. crayroud added a comment. This new version adds the possibility to configure space before opening parentheses independently from one another. Instead of creating a new SBPO_ mode for each combinations. CHANGES SINCE LAST ACTION https://reviews.l