[cfe-dev] scopes in CFGs

Ted Kremenek kremenek at apple.com
Mon Mar 15 10:23:19 PDT 2010


Hi Evan,

This functionality isn't fully implemented.  I'll add a comment in the code.  Unfortunately I won't have time to look at finishing up this feature immediately, so if anyone wants to help take a crack at it please talk to me.

Best,
Ted

On Mar 15, 2010, at 10:06 AM, Evan Herbst wrote:

> When I call buildCFG() with AddScopes = true, I get an end-scope node with no predecessors. EG
> 
> int main()
> {
> 	return 0;
> }
> 
> gives
> 
> <<<
>  [ B3 (ENTRY) ]
>     Predecessors (0):
>     Successors (1): B2
> 
>  [ B1 ]
>       1: end scope
>     Predecessors (0):
>     Successors (1): B0
> 
>  [ B2 ]
>       1: start scope
>       2: return 0;
>     Predecessors (1): B3
>     Successors (1): B0
> 
>  [ B0 (EXIT) ]
>     Predecessors (2): B1 B2
>     Successors (0):
>>>> 
> 
> . I don't see any existing call of buildCFG() with AddScopes = true. Is this the intended behavior?
> 
> My code looks like
> 
> FunctionDecl* f = ...;
> CFG* cfg = CFG::buildCFG(f, f->getBody(), &f->getASTContext(), false/* add exception handling edges */, true/* add 
> scopes */);
> cfg->dump(LangOptions());
> 
> Thanks.
> 
> - Evan
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list