[cfe-dev] Clang-format breaks #define and #include directive

Daniel Jasper djasper at google.com
Tue Nov 5 08:51:38 PST 2013


Hi,

I have never seen this particular behavior. What version are you running?
Are you possibly using some exotic file encoding? In LLVM and Google style,
clang-format most definitely should not be doing this.

Cheers,
Daniel


On Tue, Nov 5, 2013 at 6:57 AM, Ignacio Enriquez <nacho4d at gmail.com> wrote:

> Hello,
>
> I hope this is the right place to ask this.
> Recently I started using clang-format. And it works really really great!
>
> I just find odd that code like the following:
>
> #include "header.h"
> #define aNumber 10
>
> gets converted into
>
> #include \
>     "header.h"
> #define aNumber \
>     10
>
> I tried llvm and google styles + other various flags and everything
> lead me to the same behaviour regarding #defines/#includes.
> How can I disable the break on #defines and very simple #defines?
> I saw some sources in llvm and no #include or #define look like above.
> Is this a bug? Maybe I am just missing something :)
>
> Any help is greatly appreciated.
>
> Ignacio
> _______________________________________________
> 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/20131105/1ed71619/attachment.html>


More information about the cfe-dev mailing list