summaryrefslogtreecommitdiffstats
path: root/test/Analysis/idempotent-operations.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-05-02 19:39:53 +0000
committerdim <dim@FreeBSD.org>2011-05-02 19:39:53 +0000
commit110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (patch)
tree64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /test/Analysis/idempotent-operations.c
parenta0fb00f9837bd0d2e5948f16f6a6b82a7a628f51 (diff)
downloadFreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.zip
FreeBSD-src-110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab.tar.gz
Vendor import of clang trunk r130700:
http://llvm.org/svn/llvm-project/cfe/trunk@130700
Diffstat (limited to 'test/Analysis/idempotent-operations.c')
-rw-r--r--test/Analysis/idempotent-operations.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/Analysis/idempotent-operations.c b/test/Analysis/idempotent-operations.c
index b47394c..10bd9ff 100644
--- a/test/Analysis/idempotent-operations.c
+++ b/test/Analysis/idempotent-operations.c
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-check-objc-mem -analyzer-checker=core.experimental.IdempotentOps -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=deadcode.IdempotentOperations -verify %s
+// RUN: %clang --analyze -Xclang -analyzer-disable-checker=deadcode.DeadStores -fblocks -Xclang -verify %s -o %t
// Basic tests
@@ -82,8 +83,8 @@ void bailout() {
typedef unsigned uintptr_t;
void kill_at_assign() {
short array[2];
- uintptr_t x = array; // expected-warning{{incompatible pointer to integer conversion}}
- short *p = x; // expected-warning{{incompatible integer to pointer conversion}}
+ uintptr_t x = (uintptr_t) array;
+ short *p = (short *) x;
// The following branch should be infeasible.
if (!(p = &array[0])) { // expected-warning{{Assigned value is always the same as the existing value}}
@@ -175,7 +176,7 @@ int false6() {
// Check that assignments filter out false positives correctly
int false7() {
- int zero = 0; // psuedo-constant
+ int zero = 0; // pseudo-constant
int one = 1;
int a = 55;
OpenPOWER on IntegriCloud