Add AfterPlacementNew option to SpaceBeforeParensOptions to have more control on placement new expressions.
Fixes https://github.com/llvm/llvm-project/issues/41501
Relates to https://github.com/llvm/llvm-project/issues/54703
Differential D127270
[clang-format] Add space in placement new expression omarahmed on Jun 7 2022, 9:10 PM. Authored by
Details Add AfterPlacementNew option to SpaceBeforeParensOptions to have more control on placement new expressions. Fixes https://github.com/llvm/llvm-project/issues/41501
Diff Detail
Event TimelineComment Actions Apart from some missing tests, looks promising!
Comment Actions Thank you for the patch, was there a github issue for this? Can we just validate that those requirements are covered here too while we are at it? https://github.com/llvm/llvm-project/issues/54703 I'll agree with @curdeius I think this looks on the right lines (thank you for doing the rst, so many of us forget to do that normally!) .. I don't have a problem with adding something like this I think it will help give people fine control
Comment Actions Does this patch really fix https://github.com/llvm/llvm-project/issues/54703? Comment Actions I think you are missing a PARSE unit test
Comment Actions Refactor the tests and add new parsing logic for nested enums in dump_format_style.py Comment Actions As I understand, the default behavior for when the user didn't use SBPO_Custom is to add a space in placement operators based on this issue. And, at the same time, the default behavior should be APO_Never when we have SBPO_Custom so that we handle other code that depends on that. the existing tests confirm this understanding. So, the current logic was added based on this understanding.
Comment Actions Nice work adding the capability to the dump script.
Comment Actions
Comment Actions Thanks for the Screenshot, please remember to mark your comments as "Done" once you've addressed them. From what I can tell this looks good.
Comment Actions I don't have push credentials so If everything is okay with the patch, can you push it for me. My email is omarpiratee2010@gmail.com
|
Are you making this by hand or by running tools/docs/dump_format_style.py?