[PATCH] D67246: clang-format: Add support for formatting lambdas with explicit template parameters.

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 12:53:34 PDT 2019


thakis marked 3 inline comments as done.
thakis added a comment.

Thanks for the thorough review! Indeed, this still gets `[]<bool b = true && false>(A &&a){}();` wrong, for the reason you mention.



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:50
+  // Skip <...> if present.
+  if (Left->Previous && Left->Previous->is(tok::greater) &&
+      Left->Previous->MatchingParen &&
----------------
krasimir wrote:
> The first `Left->Previous` check is unnecessary here, following the previous `if`.
I removed the previous `if`, it makes the function more symmetric.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67246/new/

https://reviews.llvm.org/D67246





More information about the cfe-commits mailing list