[cfe-dev] clang-format: ShortFunctionsOnASingleLine

Florian Lindner via cfe-dev cfe-dev at lists.llvm.org
Thu Oct 15 06:14:54 PDT 2015


Hello,

I have this piece of code:

class C
{
  C() {}
};

void f() {}

AllowShortFunctionsOnASingleLine is set to empty, so I expect these function to be left as is.

florian at asaru ~/scratch (git)-[master] % clang-format -style=file -dump-config | grep ShortFunction
AllowShortFunctionsOnASingleLine: Empty

However:

florian at asaru ~/scratch (git)-[master] % clang-format -style=file clangformat.cpp                  
class C
{
  C()
  {
  }
};

void f()
{
}


Is there something I misunderstand about this option?

Thanks,
Florian



More information about the cfe-dev mailing list