djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.

Some last comments, but basically looks good.



================
Comment at: include/clang/Format/Format.h:352
 
-  /// \brief If ``true``, always break after the ``template<...>`` of a 
template
-  /// declaration.
-  /// \code
-  ///    true:                                  false:
-  ///    template <typename T>          vs.     template <typename T> class C 
{};
-  ///    class C {};
-  /// \endcode
-  bool AlwaysBreakTemplateDeclarations;
+  /// \brief Different ways to break after the template declaration.
+  enum BreakTemplateDeclarationsStyle {
----------------
Don't forget to run docs/tools/dump_format_style.py to update the docs.


================
Comment at: include/clang/Format/Format.h:355
+      /// Do not force break before declaration.
+      /// ``PenaltyBreakTemplateDeclaration`` is taken into account.
+      /// \code
----------------
I think it'd be worth having a case here that would actually be formatted 
differently with BTDS_MultiLine.


================
Comment at: lib/Format/TokenAnnotator.cpp:2248
+  if (Left.ClosesTemplateDeclaration)
+      return Style.PenaltyBreakTemplateDeclaration;
   if (Left.is(TT_ConditionalExpr))
----------------
Indentation is off


Repository:
  rC Clang

https://reviews.llvm.org/D42684



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to