summaryrefslogtreecommitdiffstats
path: root/test/Analysis/idempotent-operations.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/idempotent-operations.c')
-rw-r--r--test/Analysis/idempotent-operations.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Analysis/idempotent-operations.c b/test/Analysis/idempotent-operations.c
index 6cc9a01..04c9bc1 100644
--- a/test/Analysis/idempotent-operations.c
+++ b/test/Analysis/idempotent-operations.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=experimental.deadcode.IdempotentOperations -verify %s
+// RUN: %clang_cc1 -Wno-int-to-pointer-cast -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=alpha.deadcode.IdempotentOperations -verify %s
// Basic tests
@@ -234,3 +234,11 @@ void rdar8601243() {
(void) start;
}
+
+float testFloatCast(int i) {
+ float f = i;
+
+ // Don't crash when trying to create a "zero" float.
+ return f - f;
+}
+
OpenPOWER on IntegriCloud