[cfe-dev] clang-format: Multiple statements in line

Erik Schnetter via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 26 08:44:47 PDT 2015


Can you use a comma instead of semicolon to separate statements that you
want on the same line?

-erik

On Wed, Aug 26, 2015 at 11:40 AM, Florian Lindner via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Am Mittwoch, 26. August 2015, 13:11:32 schrieb Daniel Jasper:
> > No, there isn't.
>
> Ok, thanks for that statement. Is this functionality planned somehow? Is
> there a bug tracker where I can file this as a wishlist item?
>
> Best Regards,
> Florian
>
> >
> > On Wed, Aug 26, 2015 at 11:23 AM, Florian Lindner via cfe-dev <
> > cfe-dev at lists.llvm.org> wrote:
> >
> > > Hello,
> > >
> > > I have code like that:
> > >
> > > ierr = KSPDestroy(&ksp);CHKERRQ(ierr);
> > >
> > > clang-format introduces a linebreak between the two statements. Is
> there a
> > > possiblity to omit that?
> > >
> > > My configuration, based on style LLVM:
> > >
> > > AllowAllParametersOfDeclarationOnNextLine: true
> > > AllowShortBlocksOnASingleLine: true
> > > AllowShortCaseLabelsOnASingleLine: true
> > > AllowShortIfStatementsOnASingleLine: true
> > > AllowShortLoopsOnASingleLine: true
> > > AllowShortFunctionsOnASingleLine: All
> > > AlwaysBreakAfterDefinitionReturnType: false
> > > AlwaysBreakTemplateDeclarations: false
> > > AlwaysBreakBeforeMultilineStrings: false
> > >
> > > (I've just set every remotely related option to don't break)
> > >
> > > Thanks,
> > > Florian
> > > _______________________________________________
> > > cfe-dev mailing list
> > > cfe-dev at lists.llvm.org
> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> > >
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>



-- 
Erik Schnetter <schnetter at gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150826/095e66fd/attachment.html>


More information about the cfe-dev mailing list