aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/idempotent-operations.c
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-09-07 20:27:56 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-09-07 20:27:56 +0000
commit84c24ed29e0bb37fc06a584e0df5bdfbe49efc8f (patch)
treeafdbba40ab3ba044c8741fc8f1ef8cf0e73215c6 /test/Analysis/idempotent-operations.c
parent3aa2146552fafac2b5ba24a42d28861d22fe3175 (diff)
Re-enabled truncation/extension checking in IdempotentOperationChecker and added a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/idempotent-operations.c')
-rw-r--r--test/Analysis/idempotent-operations.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Analysis/idempotent-operations.c b/test/Analysis/idempotent-operations.c
index 5c9a59d736..d88bf49485 100644
--- a/test/Analysis/idempotent-operations.c
+++ b/test/Analysis/idempotent-operations.c
@@ -187,3 +187,10 @@ int false7() {
return a;
}
+
+// Check truncations do not flag as self-assignments
+void false8() {
+ int a = 10000000;
+ a = (short)a; // no-warning
+ test(a);
+}