]> granicus.if.org Git - clang/commitdiff
Add a pass-by-value test for the analyzer.
authorTed Kremenek <kremenek@apple.com>
Mon, 3 Aug 2009 23:22:53 +0000 (23:22 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 3 Aug 2009 23:22:53 +0000 (23:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78018 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/misc-ps.m

index 5cfcd714cdb0640dfffb8b6bbc72b7a60ffa7523..ce166880f8d83a01a2a39d200b2bf2086757715f 100644 (file)
@@ -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);
+}
+