[PATCH] D30487: ClangFormat - Add option to break before inheritance separation operator in class declaration

Andi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 2 01:51:16 PST 2017


Abpostelnicu marked 9 inline comments as done.
Abpostelnicu added inline comments.


================
Comment at: lib/Format/TokenAnnotator.cpp:2398
 
+// Determine if the next token from the closing scope is an inheritance token
+static bool hasMultipleInheritance(const FormatToken &Tok) {
----------------
djasper wrote:
> I don't understand this comment or what the function is supposed to do. It seems to search whether there is an inheritance comma somewhere in the rest of the line.
I've corrected the comment, if we have single inheritance we don't want to break onto the next line before the inheritance operand, that's why i'm looking for a TT_InheritanceComma, because if there is one then we are dealing with multiple inheritance.  


Repository:
  rL LLVM

https://reviews.llvm.org/D30487





More information about the cfe-commits mailing list