Add a pass-by-value test for the analyzer.

llvm-svn: 78018
This commit is contained in:
Ted Kremenek 2009-08-03 23:22:53 +00:00
parent 8ce12538c1
commit d673098480
1 changed files with 14 additions and 0 deletions

View 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);
}