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:/
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
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
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
===
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
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
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
===
-
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,
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
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
___
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
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
12 matches
Mail list logo