[PATCH] Fix bug in clang-format while merging short function (PR19461)
Dinesh Dwivedi
dinesh.d at samsung.com
Thu Apr 24 03:27:41 PDT 2014
Hi Klimek,
Thanks for review.
With this change, I am trying to figure out whether there is a "gap" in the line.
If this gap is just white spaces, we do not have to do anything. But if there are
other constructs such as preprocessor directives, we should merge this function to
single line.
During debugging, I have observed that if there are other constructs, block before
and after the construct (inclusive) are handled separately [Basically, I am trying
to say is I found TheLine->MustBeDeclaration to be false for 'after' block in such
cases]. I assumed, just checking for this case is good enough, as asserted from test
cases too.
If you think this is not correct, I will look in to code and try to find better fix.
Regards
http://reviews.llvm.org/D3439
More information about the cfe-commits
mailing list