From: Ted Kremenek Date: Mon, 3 Aug 2009 23:22:53 +0000 (+0000) Subject: Add a pass-by-value test for the analyzer. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48775d5bf05120adb2a953bbcd626405bf666b22;p=clang 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 --- 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); +} +