From bc9eaef24cd9bf46eb2f99c876faeee214f75711 Mon Sep 17 00:00:00 2001 From: Tom Care Date: Tue, 7 Sep 2010 20:27:56 +0000 Subject: Re-enabled truncation/extension checking in IdempotentOperationChecker and added a test case. llvm-svn: 113269 --- clang/test/Analysis/idempotent-operations.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/test') diff --git a/clang/test/Analysis/idempotent-operations.c b/clang/test/Analysis/idempotent-operations.c index 5c9a59d7361..d88bf49485e 100644 --- a/clang/test/Analysis/idempotent-operations.c +++ b/clang/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); +} -- cgit v1.2.3