aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-02 17:25:00 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-02 17:25:00 +0000
commitef77d54a493a18d8e2dae772230987e5c01bfb04 (patch)
tree978fe640d43c71401f522a52d222d4aac8f383b4
parentdd6f4abe816a529cfc8c0487f9a13f3b88f0aae8 (diff)
Add a few more analyzer test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68326 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/uninit-vals-ps.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/uninit-vals-ps.c b/test/Analysis/uninit-vals-ps.c
index 37075a2ef8..d5b24a371b 100644
--- a/test/Analysis/uninit-vals-ps.c
+++ b/test/Analysis/uninit-vals-ps.c
@@ -43,6 +43,21 @@ int f3(void) {
return 1;
}
+void f4_aux(float* x);
+float f4(void) {
+ float x;
+ f4_aux(&x);
+ return x; // no-warning
+}
+
+struct f5_struct { int x; };
+void f5_aux(struct f5_struct* s);
+int f5(void) {
+ struct f5_struct s;
+ f5_aux(&s);
+ return s.x; // no-warning
+}
+
int ret_uninit() {
int i;
int *p = &i;