[PATCH] D43121: clang-format: keep ObjC colon alignment with short object name

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 06:03:01 PST 2018


Typz added inline comments.


================
Comment at: lib/Format/ContinuationIndenter.cpp:900
+             std::max(NextNonComment->LongestObjCSelectorName,
+                      unsigned(NextNonComment->TokenText.size())) -
              NextNonComment->ColumnWidth;
----------------
djasper wrote:
> I'd prefer to use std::max<unsigned>( .. )
> 
> (and we generally don't use c-style casts)
this is C++-style C-style cast :-)

anyway changed to use ColumnWidth, as this is also what is used for initializing LongestObjCSelectorName.


Repository:
  rC Clang

https://reviews.llvm.org/D43121





More information about the cfe-commits mailing list