[llvm-commits] [gcc-plugin] r81369 - /gcc-plugin/trunk/llvm-convert.cpp

Mike Stump mrs at apple.com
Wed Sep 9 13:09:31 PDT 2009


On Sep 9, 2009, at 11:48 AM, Duncan Sands wrote:
> Author: baldrick
> Date: Wed Sep  9 13:48:48 2009
> New Revision: 81369
>
> URL: http://llvm.org/viewvc/llvm-project?rev=81369&view=rev
> Log:
> When using a DenseMap M, doing M[x]=function_that_changes_M
> can result in badness like using freed memory.  So avoid this
> construct.

In clang we compute rhs first, so that is rhs changes the lhs, the lhs  
picks up the updates.  :-)  This is undocumented except for the  
__block Type i = j(); case, which is why we did it.



More information about the llvm-commits mailing list