summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r--clang/test/Analysis/apsint.c7
-rw-r--r--clang/test/Analysis/z3/apsint.c16
2 files changed, 16 insertions, 7 deletions
diff --git a/clang/test/Analysis/apsint.c b/clang/test/Analysis/apsint.c
deleted file mode 100644
index d37fce11ddb..00000000000
--- a/clang/test/Analysis/apsint.c
+++ /dev/null
@@ -1,7 +0,0 @@
-// REQUIRES: z3
-// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu -analyzer-checker=core -verify %s
-// expected-no-diagnostics
-
-_Bool a() {
- return !({ a(); });
-}
diff --git a/clang/test/Analysis/z3/apsint.c b/clang/test/Analysis/z3/apsint.c
new file mode 100644
index 00000000000..670ef2be1c5
--- /dev/null
+++ b/clang/test/Analysis/z3/apsint.c
@@ -0,0 +1,16 @@
+// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu -analyzer-checker=core -verify %s
+// expected-no-diagnostics
+
+// https://bugs.llvm.org/show_bug.cgi?id=37622
+_Bool a() {
+ return !({ a(); });
+}
+
+// https://bugs.llvm.org/show_bug.cgi?id=37646
+_Bool b;
+void c() {
+ _Bool a = b | 0;
+ for (;;)
+ if (a)
+ ;
+}
OpenPOWER on IntegriCloud