[cfe-dev] clang-format support for braces in struct initialization

Daniel Jasper djasper at google.com
Tue Aug 5 05:37:21 PDT 2014


Could you be more specific about what clang-format currently doesn't do to
your liking?


On Tue, Aug 5, 2014 at 2:27 PM, Martin Liška <mliska at suse.cz> wrote:

> Hello,
>    I would like to implement support for braces for struct inialization
> like:
>
> |address temp_addres=  {
>   0,   // street_no
>   nullptr,   // street_name
>   "Hamilton",   // city
>   "Ontario",   // prov
>   nullptr,   // postal_code
> };
> |
>
>
> My interest is to control if the brace after equation should be placed to
> a separate line or not (controlled by *BreakBeforeBraces). I tried to read
> UnwrappedLineParser, but don't know how to identify such a context?
>
> Thanks,
> Martin
> *
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140805/ff9a9b03/attachment.html>


More information about the cfe-dev mailing list