[cfe-commits] r65707 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Sat Feb 28 12:48:54 PST 2009


Chris,

This is incorrect (it will crash in some cases).  We need the  
std::pair<> object to stay persistent in memory after the call to  
EvalEagerlyAssume.  I can make this a field in the GRExprEngine object.

On Feb 28, 2009, at 11:37 AM, Chris Lattner wrote:

> Author: lattner
> Date: Sat Feb 28 13:37:06 2009
> New Revision: 65707
>
> URL: http://llvm.org/viewvc/llvm-project?rev=65707&view=rev
> Log:
> remove static ctor.
>
> Modified:
>    cfe/trunk/lib/Analysis/GRExprEngine.cpp
>
> Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=65707&r1=65706&r2=65707&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
> +++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Sat Feb 28 13:37:06 2009
> @@ -1357,10 +1357,10 @@
> // Transfer function: Objective-C ivar references.
> // 
> = 
> = 
> = 
> ----------------------------------------------------------------------= 
> ==//
>
> -static std::pair<const void*,const void*> EagerlyAssumeTag
> -  = std::pair<const void*,const void*>(&EagerlyAssumeTag,0);
> -
> void GRExprEngine::EvalEagerlyAssume(NodeSet &Dst, NodeSet &Src,  
> Expr *Ex) {
> +  std::pair<const void*,const void*>
> +    EagerlyAssumeTag((const void*)&EagerlyAssumeTag, 0);
> +
>   for (NodeSet::iterator I=Src.begin(), E=Src.end(); I!=E; ++I) {
>     NodeTy *Pred = *I;
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list