[cfe-dev] Missing CFG generation?

Ted Kremenek kremenek at apple.com
Fri Dec 2 13:06:11 PST 2011


Looks like a bug.  Please file a bug report.

On Dec 2, 2011, at 3:44 AM, Abramo Bagnara <abramo.bagnara at gmail.com> wrote:

> 
> I believe that the generation of a flat CFG for the code below is a
> symptom of a bug (VM types inside cast should generate code).
> 
> I'm missing something?
> 
> $ cat bug.c
> int g();
> 
> int f() {
>  (char (*)[g() ? f() : g()])0;
> }
> $ _clang -cc1 -w -analyze -analyzer-checker=debug.DumpCFG bug.c
> 
> [ B2 (ENTRY) ]
>    Predecessors (0):
>    Successors (1): B1
> 
> [ B1 ]
>      1: 0
>      2: (char (*)[g() ? f() : g()])[B1.1]
>    Predecessors (1): B2
>    Successors (1): B0
> 
> [ B0 (EXIT) ]
>    Predecessors (1): B1
>    Successors (0):
> 
> _______________________________________________
> 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