[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 09:40:05 PDT 2019


klimek added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1400-1403
+    } else if (Current.Previous && Current.Previous->is(tok::r_paren) &&
+               Current.startsSequence(tok::arrow, tok::identifier, tok::less)) {
+      // Deduction guides trailing arrow "...) -> A<T>".
+      Current.Type = TT_TrailingReturnArrow;
----------------
Why doesn't this trigger on function templates:
  c()->f<int>();



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

https://reviews.llvm.org/D69577





More information about the cfe-commits mailing list