no-exit-cfg.c revision c037eac3bda3c636c961aab6377beea3242e81e4
1// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s && 2// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s && 3// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s 4 5// This is a test case for the issue reported in PR 2819: 6// http://llvm.org/bugs/show_bug.cgi?id=2819 7// The flow-sensitive dataflow solver should work even when no block in 8// the CFG reaches the exit block. 9 10int g(int x); 11void h(int x); 12 13int f(int x) 14{ 15out_err: 16 if (g(x)) { 17 h(x); 18 } 19 goto out_err; 20} 21