aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-08-03 23:22:53 +0000
committerTed Kremenek <kremenek@apple.com>2009-08-03 23:22:53 +0000
commit48775d5bf05120adb2a953bbcd626405bf666b22 (patch)
tree7dcf4e345b24fff50a32e10cc9ca789e1377a9eb
parent8f6e88f90f8e111bdcc7eac574e8c6a3b706f5b0 (diff)
Add a pass-by-value test for the analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78018 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/misc-ps.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m
index 5cfcd714cd..ce166880f8 100644
--- a/test/Analysis/misc-ps.m
+++ b/test/Analysis/misc-ps.m
@@ -508,3 +508,17 @@ FARPROC test_load_func(FARPROC origfun) {
return origfun;
return 0;
}
+
+// Test passing-by-value an initialized struct variable.
+struct test_pass_val {
+ int x;
+ int y;
+};
+void test_pass_val_aux(struct test_pass_val s);
+void test_pass_val() {
+ struct test_pass_val s;
+ s.x = 1;
+// s.y = 2;
+ test_pass_val_aux(s);
+}
+