[PATCH] D35743: [clang-format] Adjust space around &/&& of structured bindings
Manuel Klimek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 21 04:20:20 PDT 2017
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: can you start with a capital letter and end with a '.'?
================
Comment at: unittests/Format/FormatTest.cpp:11604-11610
+ verifyFormat("auto const &&x1 = y1;", getGoogleStyle());
+ verifyFormat("auto const &&x2 = y1;", getLLVMStyle());
+ verifyFormat("auto const &x1 = y2;", getGoogleStyle());
+ verifyFormat("auto const &x2 = y2;", getLLVMStyle());
+ verifyFormat("auto const &x1 = y2;", getGoogleStyle());
+ verifyFormat("auto const *x1, *x2;", getGoogleStyle());
+ verifyFormat("auto const *x3, *x4;", getLLVMStyle());
----------------
I don't think the non-structured-binding tests are necessary here, as they're testing something completely different?
https://reviews.llvm.org/D35743
More information about the cfe-commits
mailing list