On Mar 28, 2013, at 17:09 , Ted Kremenek <[email protected]> wrote:

> +void ExprEngine::processStaticInitializer(const DeclStmt *DS,
> +                                          NodeBuilderContext &BuilderCtx,
> +                                          ExplodedNode *Pred,
> +                                          clang::ento::ExplodedNodeSet &Dst,
> +                                          const CFGBlock *DstT,
> +                                          const CFGBlock *DstF) {
> +  currBldrCtx = &BuilderCtx;
> +
> +  const VarDecl *VD = cast<VarDecl>(DS->getSingleDecl());
> +  ProgramStateRef state = Pred->getState();
> +  bool initHasRun = state->contains<InitializedGlobalsSet>(VD);
> +  BranchNodeBuilder builder(Pred, Dst, BuilderCtx, DstT, DstF);
> +
> +  if (!initHasRun) {
> +    state = state->add<InitializedGlobalsSet>(VD);
> +  }
> +
> +  builder.generateNode(state, initHasRun, Pred);
> +  builder.markInfeasible(!initHasRun);
> +
> +  currBldrCtx = 0;
> +}


Hm, this isn't really correct, since most calls to functions will happen after 
the first. But it's consistent with what we're doing now. I guess it's 
something we can revisit later.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to