Page MenuHomePhabricator
Feed Advanced Search

Jun 23 2021

vlovich committed rGbe9a87fe9bc3: [clang-format] Add IfMacros option (authored by vlovich).
[clang-format] Add IfMacros option
Jun 23 2021, 8:53 AM
vlovich closed D102730: [clang-format] Support custom If macros.
Jun 23 2021, 8:53 AM · Restricted Project, Restricted Project

Jun 22 2021

vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Rebase onto main.

Jun 22 2021, 4:46 PM · Restricted Project, Restricted Project

Jun 18 2021

vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Fix clang-format issue

Jun 18 2021, 6:49 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

I think you can go ahead & commit it for me. I don't know when I'll get commit access.

Jun 18 2021, 6:44 PM · Restricted Project, Restricted Project

Jun 16 2021

vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Review response

Jun 16 2021, 3:45 PM · Restricted Project, Restricted Project
vlovich added a comment to D102730: [clang-format] Support custom If macros.

Just back from vacation so will try to polish this off today.

Jun 16 2021, 1:58 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

I don't think I have permissions. Happy to do it if I'm given permissions (I'm assuming the instructions are the general LLVM ones). Otherwise:

Jun 16 2021, 1:56 PM · Restricted Project, Restricted Project

May 27 2021

vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

I think all review comments have been addressed. Please let me know if there's anything else blocking merge.

May 27 2021, 12:58 PM · Restricted Project, Restricted Project
vlovich added inline comments to D102730: [clang-format] Support custom If macros.
May 27 2021, 12:56 PM · Restricted Project, Restricted Project

May 21 2021

vlovich updated the diff for D102706: [clang-format] Add new LambdaBodyIndentation option.

Regen documentation & clang-format test cases.

May 21 2021, 4:39 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

Is `Signature``` effectively as is?

May 21 2021, 4:35 PM · Restricted Project, Restricted Project
vlovich added inline comments to D102730: [clang-format] Support custom If macros.
May 21 2021, 4:26 PM · Restricted Project, Restricted Project
vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Review response. Updated the options I changed via the dump_format_style.py script but didn't ingest all the other changes it generated.
Changed the SBPO option to have a more generic name that also applies to IF macros.
Fix typo in release notes.

May 21 2021, 4:26 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

Could you clang-format the tests please so I can more easily read them.

May 21 2021, 3:31 PM · Restricted Project, Restricted Project

May 20 2021

vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Fixed missing _ after the hyperlink to the KJ link in the Style options documentation. I'm assuming that's required formatting for hyperlinks by what renders the markdown.

May 20 2021, 3:20 PM · Restricted Project, Restricted Project
vlovich updated the diff for D102706: [clang-format] Add new LambdaBodyIndentation option.

Review response

May 20 2021, 3:18 PM · Restricted Project, Restricted Project
vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Updated release notes.

May 20 2021, 2:54 PM · Restricted Project, Restricted Project
vlovich added inline comments to D102730: [clang-format] Support custom If macros.
May 20 2021, 2:50 PM · Restricted Project, Restricted Project
vlovich updated the diff for D102730: [clang-format] Support custom If macros.

Review response:

May 20 2021, 2:50 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

verifyFormat("test() {\n"

"  ([]() -> {\n"
"    int b = 32;\n"
"    return 3;\n"
"  }).foo();\n"
"}",
Style);
There you have parenthesis around the lambda, how about without?
Maybe just something like

std::sort(v.begin(), v.end(), [](const auto& lhs, const auto& rhs) { return lhs.Foo < rhs.Foo; });

May 20 2021, 2:39 PM · Restricted Project, Restricted Project

May 18 2021

vlovich added inline comments to D102730: [clang-format] Support custom If macros.
May 18 2021, 3:29 PM · Restricted Project, Restricted Project
vlovich requested review of D102730: [clang-format] Support custom If macros.
May 18 2021, 3:29 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

Maybe a bit more test cases with smaller lambdas? Or without the outer parenthesis?

May 18 2021, 1:01 PM · Restricted Project, Restricted Project
vlovich added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

I'm not 100% certain if the implementation is absolutely correct. For example, the #define A test case is broken (the closing brace is indented incorrectly). Additionally, the pop_back feels weird but seems to fix all the other cases to make the closing brace aligned properly. Maybe some/all of the implementation belongs in ContinuationIndenter.cpp instead but I couldn't really follow where the best place to do that might be. I can also just leave the preprocessor macro case as a known issue for now.

May 18 2021, 11:28 AM · Restricted Project, Restricted Project
vlovich requested review of D102706: [clang-format] Add new LambdaBodyIndentation option.
May 18 2021, 11:25 AM · Restricted Project, Restricted Project