]> git.proxmox.com Git - rustc.git/blob - src/llvm/tools/clang/test/Analysis/no-exit-cfg.c
Imported Upstream version 0.6
[rustc.git] / src / llvm / tools / clang / test / Analysis / no-exit-cfg.c
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s
2
3 // This is a test case for the issue reported in PR 2819:
4 // http://llvm.org/bugs/show_bug.cgi?id=2819
5 // The flow-sensitive dataflow solver should work even when no block in
6 // the CFG reaches the exit block.
7
8 int g(int x);
9 void h(int x);
10
11 int f(int x)
12 {
13 out_err:
14 if (g(x)) {
15 h(x);
16 }
17 goto out_err;
18 }