[cfe-commits] r103406 - /cfe/trunk/lib/AST/ExprCXX.cpp

Douglas Gregor dgregor at apple.com
Mon May 10 10:17:09 PDT 2010


On May 10, 2010, at 9:59 AM, Daniel Dunbar wrote:

> Author: ddunbar
> Date: Mon May 10 10:59:37 2010
> New Revision: 103406
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=103406&view=rev
> Log:
> Fix refacto in r103387, noticed by Christopher Jefferson.
> 
> Modified:
>    cfe/trunk/lib/AST/ExprCXX.cpp
> 
> Modified: cfe/trunk/lib/AST/ExprCXX.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=103406&r1=103405&r2=103406&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/ExprCXX.cpp (original)
> +++ cfe/trunk/lib/AST/ExprCXX.cpp Mon May 10 10:59:37 2010
> @@ -542,9 +542,9 @@
> 
> void CXXExprWithTemporaries::setNumTemporaries(unsigned N) {
>   assert(Temps == 0 && "Cannot resize with this");
> +  NumTemps = N;
>   // FIXME: This is a memory leak in disable free mode.
>   Temps = new CXXTemporary*[NumTemps];
> -  NumTemps = N;
> }

Errr... this should be allocating via the ASTContext.

	- Doug



More information about the cfe-commits mailing list