[cfe-commits] r72673 - in /cfe/trunk: lib/Sema/SemaExprCXX.cpp test/CodeGenCXX/new.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Sun May 31 14:52:21 PDT 2009


Anders Carlsson wrote:
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun May 31 15:26:12 2009
> @@ -508,6 +508,11 @@
>        return true;
>    }
>  
> +  // FindAllocationOverload can change the passed in arguments, so we need to
> +  // copy them back.
> +  if (NumPlaceArgs > 0)
> +    std::copy(&AllocArgs[1], AllocArgs.end(), PlaceArgs);
> +  
>   
Why, so it can! I never thought about this.
Hmm, now I wonder how many times I've made this mistake ...

Sebastian



More information about the cfe-commits mailing list