commit | 7c686661d65c63f6f518ca81830dd61bd64bfe1f | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Fri Nov 21 00:28:47 2008 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Fri Nov 21 00:28:47 2008 +0000 |
tree | ab98be933c0d19406a0caaee77823fb0e4bbef24 | |
parent | 5917d7894e8274b9625275dd4dd86c5d0040a242 [diff] [blame] |
Add checker test case: warn about returning an uninitialized value to the caller. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59765 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/uninit-vals-ps.c b/test/Analysis/uninit-vals-ps.c index a287002..58f6431 100644 --- a/test/Analysis/uninit-vals-ps.c +++ b/test/Analysis/uninit-vals-ps.c
@@ -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.}} +} + +