#include
int
main(int argc,char**argv ) { std::cout <<“Hello” ;
}
is formatted by clang-format 3.9 (from debian, but confirmed w/ a 4.0 compiled by me) as:
[this w/ all default]
#include
int
main(int argc,char**argv ) {
std::cout << “Hello”;
}
removing the extra white lines, hence starting from:
#include
int
main(int argc,char**argv ) { std::cout <<“Hello” ;
}
gives:
#include
int main(int argc, char **argv) { std::cout << “Hello”; }
so it looks like extra blank lines prevents clang-format from reformatting anything at all, which is not what I would have expected.
Two question:
- can other people confirm this, as it might be a quirk of my environment
- is it intended? If it is only between type and function it is probably not a big deal in practice.
Thanks,
Maurizio