[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-26 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314264: [clang-format] Adjust space around &/&& of structured bindings (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35743?vs=116201&id=116744#toc Repository: rL LLVM https:/

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-26 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Thanks for the changes. LGTM. https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-25 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. ping. https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-21 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 116201. chh marked 2 inline comments as done. chh edited the summary of this revision. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp ===

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Could you add just one more test for `PAS_Middle` please? A single line will be just enough. Otherwise, LGTM. https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Apart from nits, LGTM, unless Daniel sees issues. Comment at: lib/Format/TokenAnnotator.cpp:2516 return Style.SpacesInAngles; + // space before TT_StructuredBindingLSquare + if (Right.is(TT_StructuredBindingLSquare)) Super-Nit: ca

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-20 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 116092. chh edited the summary of this revision. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp === -

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. 1. Can you rebase after r313742? I fixed detection of structured bindings in the UnwrappedLineParser, that might affect this patch 2. Isn't LLVM style the reverse? That is, shouldn't that be LLVM style: auto &&[a, b] = ... Pointer/Ref-to-type-style: auto&& [a,

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Ok, we still need to fix structured bindings in the UnwrappedLineParser. Unfortunately isCppStructuredBinding requires a "previous token" function, which we don't really have in the UnwrappedLineParser. /me goes thinking more about that part of the problem. That should b

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-19 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. There is one big missing thing here: `PointerAlignment`. Actually only `PAS_Left` is taken into account. There are 3 possible options: Left: `auto& [a, b] = f();` Middle: `auto & [a, b] = f();` Right: `auto &[a, b] = f();` https://reviews.llvm.org/D35743 ___

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. So we actually didn't need to change the UnwrappedLineParser? I assume we still incorrectly assume the structured bindings are labmdas then? https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings

2017-09-18 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh updated this revision to Diff 115741. https://reviews.llvm.org/D35743 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp === --- unittests/Format/FormatTest.cpp +++ u