diff options
| author | Nuno Lopes <nunoplopes@sapo.pt> | 2009-11-06 18:42:13 +0000 |
|---|---|---|
| committer | Nuno Lopes <nunoplopes@sapo.pt> | 2009-11-06 18:42:13 +0000 |
| commit | ac5eba93ca9cefd9618cde047a3ec45d15f39d14 (patch) | |
| tree | 70190b55e3ee320f7ac9bb2067c4d07c2d982165 /clang | |
| parent | d91a7960bfc8ed39e3d8377fa209832fb73c5d53 (diff) | |
| download | bcm5719-llvm-ac5eba93ca9cefd9618cde047a3ec45d15f39d14.tar.gz bcm5719-llvm-ac5eba93ca9cefd9618cde047a3ec45d15f39d14.zip | |
add test case for PR3135 which was already fixed
llvm-svn: 86273
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Analysis/PR3135.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Analysis/PR3135.c b/clang/test/Analysis/PR3135.c new file mode 100644 index 00000000000..1fca57b47b5 --- /dev/null +++ b/clang/test/Analysis/PR3135.c @@ -0,0 +1,20 @@ +// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// PR3135 + +typedef struct { + int *a; +} structure; + +int bar(structure *x); + +int foo() +{ + int x; + structure y = {&x}; + + // the call to bar may initialize x + if (bar(&y) && x) // no-warning + return 1; + + return 0; +} |

