[llvm-dev] Codifying our Brace rules-
David Chisnall via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 24 09:58:12 PDT 2020
On 24/06/2020 17:08, Mehdi AMINI wrote:
> I remember fixing one bug in LLVM that was caused by not having braces
> around an if statement and a modification that didn't notice this. I
> have fixed other bugs in a downstream fork where upstream has done this:
>
> if (x) {
> something();
> somethingElse();
> }
>
> We've changed it to:
>
> if (x) {
> something();
> somethingElse();
> ohAndOneMoreThing();
> }
>
> And then upstream has changed it to
>
> if (x)
> something();
>
> And, after merge, our code has been:
>
> if (x)
> something();
> ohAndOneMoreThing();
>
>
> To be clear this was a merge-conflict that was manually resolved this
> way right? I don't see git auto-merging this diff.
Yes, this was a result of too-quickly resolving conflicts. A typical
upstream merge after a month has a few hundred changes. It doesn't take
much inattention for something like this to slip through.
David
More information about the llvm-dev
mailing list