no-exit-cfg.c revision e1cea75e70d76f55157749a7bcad319050492945
1// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
2// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-new-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