[cfe-commits] r59765 - /cfe/trunk/test/Analysis/uninit-vals-ps.c
Ted Kremenek
kremenek at apple.com
Thu Nov 20 16:28:47 PST 2008
Author: kremenek
Date: Thu Nov 20 18:28:47 2008
New Revision: 59765
URL: http://llvm.org/viewvc/llvm-project?rev=59765&view=rev
Log:
Add checker test case: warn about returning an uninitialized value to the caller.
Modified:
cfe/trunk/test/Analysis/uninit-vals-ps.c
Modified: cfe/trunk/test/Analysis/uninit-vals-ps.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/uninit-vals-ps.c?rev=59765&r1=59764&r2=59765&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/uninit-vals-ps.c (original)
+++ cfe/trunk/test/Analysis/uninit-vals-ps.c Thu Nov 20 18:28:47 2008
@@ -43,3 +43,10 @@
return 1;
}
+int ret_uninit() {
+ int i;
+ int *p = &i;
+ return *p; // expected-warning{{Uninitialized or undefined return value returned to caller.}}
+}
+
+
More information about the cfe-commits
mailing list