commit | 3b58786f85aaa173e122f6eaff0b6efa233d59a2 | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Fri Jan 09 22:15:01 2009 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Fri Jan 09 22:15:01 2009 +0000 |
tree | 115faaecdab2e0db286c64c2e33c661c5bd63cea | |
parent | 5f074266cc59563036c40516c814d63825723e20 [diff] [blame] |
Dead stores checker: Don't flag dead stores for self-assignments (common escape hatch for 'unused variable' warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62010 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/dead-stores.c b/test/Analysis/dead-stores.c index 71c4e3b..7f99499 100644 --- a/test/Analysis/dead-stores.c +++ b/test/Analysis/dead-stores.c
@@ -127,3 +127,8 @@ return x; } +// Self-assignments should not be flagged as dead stores. +int f17() { + int x = 1; + x = x; // no-warning +}