thezbyg marked an inline comment as done. thezbyg added inline comments.
================ Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1221 + if (Style.EmptyLineBeforeAccessModifier && + PreviousLine->Last->isOneOf(tok::semi, tok::r_brace) && + RootToken.NewlinesBefore == 1) ---------------- MyDeveloperDay wrote: > maybe I don't understand the logic but why is this `r_brace` and shouldn't we > be looking at the "Last Non Comment" token? I think that the logic is to only add empty line when access modifier is after member function body (`r_brace` indicates this) or declaration of field/function. If this check is changed to look at "last non comment" token, then empty line will be inserted in code like this: ``` struct Foo { int i; //comment private: int j; } ``` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93846/new/ https://reviews.llvm.org/D93846 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits