[cfe-dev] Missing CFG generation?

Abramo Bagnara abramo.bagnara at gmail.com
Fri Dec 2 03:44:55 PST 2011


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):




More information about the cfe-dev mailing list