anastasiia_lukianenko added a comment.
In D91949#2503646 <https://reviews.llvm.org/D91949#2503646>, @MyDeveloperDay
wrote:
> I think the revision whilst it does what is needed to structs doesn't address
> the many other times this forms appear. I think we need something a little
> more extensive. It can't just be when a line starts with struct
I did it in the same way as existing options made in MustBreakBefore function
(here we can see that we check only //Line.startsWith(tok::kw_struct)//, no
more extensive conditions):
if (isAllmanBrace(Left) || isAllmanBrace(Right))
return (Line.startsWith(tok::kw_enum) && Style.BraceWrapping.AfterEnum) ||
(Line.startsWith(tok::kw_typedef, tok::kw_enum) &&
Style.BraceWrapping.AfterEnum) ||
(Line.startsWith(tok::kw_class) && Style.BraceWrapping.AfterClass) ||
(Line.startsWith(tok::kw_struct) && Style.BraceWrapping.AfterStruct);
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91949/new/
https://reviews.llvm.org/D91949
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits