r189337 - clang-format: Revamp builder-type call formatting.
Tobias Grosser
tobias at grosser.es
Thu Sep 5 16:04:59 PDT 2013
On 08/27/2013 04:09 AM, Daniel Jasper wrote:
> Author: djasper
> Date: Tue Aug 27 06:09:05 2013
> New Revision: 189337
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189337&view=rev
> Log:
> clang-format: Revamp builder-type call formatting.
>
> Previously builder-type calls were only correctly recognized in
> top-level calls.
>
> This fixes llvm.org/PR16981.
> Before:
> someobj->Add((new util::filetools::Handler(dir))->OnEvent1(
> NewPermanentCallback(this, &HandlerHolderClass::EventHandlerCBA))
> ->OnEvent2(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBB))
> ->OnEvent3(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBC))
> ->OnEvent5(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBD))
> ->OnEvent6(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBE)));
>
> After:
> someobj->Add((new util::filetools::Handler(dir))
> ->OnEvent1(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBA))
> ->OnEvent2(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBB))
> ->OnEvent3(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBC))
> ->OnEvent5(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBD))
> ->OnEvent6(NewPermanentCallback(
> this, &HandlerHolderClass::EventHandlerCBE)));
Hi Daniel,
this change introduced a regression:
== Before the change ==
bool foo() {
if (APF.convertToInteger(&UIntVal, 64, true, APFloat::rmTowardZero,
&isExact) != APFloat::opOK ||
!isExact)
return false
}
== After the change ==
bool foo() {
if (APF.convertToInteger(&UIntVal, 64, true, APFloat::rmTowardZero,
&isExact) !=
APFloat::opOK ||
!isExact)
return false
}
The line break which is introduced by this change after the '!=' seems
to be a formatting regression.
Cheers,
Tobias
More information about the cfe-commits
mailing list