r175483 - Fixing a typo where FixIts was accidentally self-assigning instead of assigning in the parameter Fixits. This fixes several failed assertions with MSVC debug builds.

David Blaikie dblaikie at gmail.com
Mon Feb 18 21:58:31 PST 2013


On Feb 18, 2013 6:33 PM, "Aaron Ballman" <aaron at aaronballman.com> wrote:
>
> Author: aaronballman
> Date: Mon Feb 18 20:32:05 2013
> New Revision: 175483
>
> URL: http://llvm.org/viewvc/llvm-project?rev=175483&view=rev
> Log:
> Fixing a typo where FixIts was accidentally self-assigning instead of
assigning in the parameter Fixits. This fixes several failed assertions
with MSVC debug builds.

I would've thought this bug would manifest much more visibly than just some
asserts under MSvc. Given that we now can see the root cause, does anyone
want to have a go at figuring out what test cases were missed when this big
was originally committed? I imagine failing to copy a parameter into a
member would be highly visible.

>
> Modified:
>     cfe/trunk/lib/Basic/Diagnostic.cpp
>
> Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
> URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=175483&r1=175482&r2=175483&view=diff
>
==============================================================================
> --- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
> +++ cfe/trunk/lib/Basic/Diagnostic.cpp Mon Feb 18 20:32:05 2013
> @@ -959,7 +959,7 @@ StoredDiagnostic::StoredDiagnostic(Diagn
>    : ID(ID), Level(Level), Loc(Loc), Message(Message)
>  {
>    this->Ranges.assign(Ranges.begin(), Ranges.end());
> -  this->FixIts.assign(FixIts.begin(), FixIts.end());
> +  this->FixIts.assign(Fixits.begin(), Fixits.end());
>  }
>
>  StoredDiagnostic::~StoredDiagnostic() { }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130218/d4cb1bb8/attachment.html>


More information about the cfe-commits mailing list