Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / no-exit-cfg.c
bloba7df3b6141bc1cfad0c519c2984ed3991b3c0f5f
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -verify %s
2 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -analyzer-config cfg-scopes=true -verify %s
3 // expected-no-diagnostics
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.
10 int g(int x);
11 void h(int x);
13 int f(int x)
15 out_err:
16 if (g(x)) {
17 h(x);
19 goto out_err;