[cfe-commits] r44225 - /cfe/trunk/test/Sema/dead-stores.c
Ted Kremenek
kremenek at apple.com
Sun Nov 18 22:38:23 PST 2007
Author: kremenek
Date: Mon Nov 19 00:38:23 2007
New Revision: 44225
URL: http://llvm.org/viewvc/llvm-project?rev=44225&view=rev
Log:
Added test case for dead stores checker (live variables analysis) that tests
for correct propagation/update of liveness information within subexpressions
of Block-Level expressions. Test case provided by Nuno Lopes.
Modified:
cfe/trunk/test/Sema/dead-stores.c
Modified: cfe/trunk/test/Sema/dead-stores.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/dead-stores.c?rev=44225&r1=44224&r2=44225&view=diff
==============================================================================
--- cfe/trunk/test/Sema/dead-stores.c (original)
+++ cfe/trunk/test/Sema/dead-stores.c Mon Nov 19 00:38:23 2007
@@ -1,6 +1,13 @@
// RUN: clang -warn-dead-stores -verify %s
+
void x() {
int k, y;
int abc=1;
long idx=abc+3*5; // expected-warning {{value stored to variable is never used}}
}
+
+void a(void *b) {
+ char *c = (char*)b; // no-warning
+ char *d = b+1; // expected-warning {{value stored to variable is never used}}
+ printf("%s", c);
+}
More information about the cfe-commits
mailing list