[cfe-commits] r56493 - /cfe/trunk/test/Analysis/no-exit-cfg.c

Ted Kremenek kremenek at apple.com
Tue Sep 23 11:05:02 PDT 2008


Author: kremenek
Date: Tue Sep 23 13:05:01 2008
New Revision: 56493

URL: http://llvm.org/viewvc/llvm-project?rev=56493&view=rev
Log:
Added test case.

Added:
    cfe/trunk/test/Analysis/no-exit-cfg.c

Added: cfe/trunk/test/Analysis/no-exit-cfg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/no-exit-cfg.c?rev=56493&view=auto

==============================================================================
--- cfe/trunk/test/Analysis/no-exit-cfg.c (added)
+++ cfe/trunk/test/Analysis/no-exit-cfg.c Tue Sep 23 13:05:01 2008
@@ -0,0 +1,18 @@
+// RUN: clang -checker-cfref -verify %s
+
+// This is a test case for the issue reported in PR 2819:
+//  http://llvm.org/bugs/show_bug.cgi?id=2819
+// The flow-sensitive dataflow solver should work even when no block in
+// the CFG reaches the exit block.
+
+int g(int x);
+void h(int x);
+
+int f(int x)
+{
+out_err:
+  if (g(x)) {
+    h(x);
+  }
+  goto out_err;
+}





More information about the cfe-commits mailing list