diff options
| author | Anna Zaks <ganna@apple.com> | 2012-05-03 02:13:53 +0000 |
|---|---|---|
| committer | Anna Zaks <ganna@apple.com> | 2012-05-03 02:13:53 +0000 |
| commit | f0e9ca86044d3e674ec7c3a335fea93eb5625c0a (patch) | |
| tree | 4991488cd0d1ac30870a4a65caf156af86a2fc4a /clang/test/Analysis/taint-generic.c | |
| parent | 1d3d51a6e6bd068651ecad7f0431bf289c2ba78f (diff) | |
| download | bcm5719-llvm-f0e9ca86044d3e674ec7c3a335fea93eb5625c0a.tar.gz bcm5719-llvm-f0e9ca86044d3e674ec7c3a335fea93eb5625c0a.zip | |
[analyzer] Do not assert on constructing SymSymExpr with diff types.
The resulting type info is stored in the SymSymExpr, so no reason not to
support construction of expression with different subexpression types.
llvm-svn: 156051
Diffstat (limited to 'clang/test/Analysis/taint-generic.c')
| -rw-r--r-- | clang/test/Analysis/taint-generic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/taint-generic.c b/clang/test/Analysis/taint-generic.c index 1cfdfead64f..8ee1896e96e 100644 --- a/clang/test/Analysis/taint-generic.c +++ b/clang/test/Analysis/taint-generic.c @@ -203,3 +203,12 @@ unsigned radar11369570_hanging(const unsigned char *arr, int l) { } return 5/a; // expected-warning {{Division by a tainted value, possibly zero}} } + +// Check that we do not assert of the following code. +int SymSymExprWithDiffTypes(void* p) { + int i; + scanf("%d", &i); + int j = (i % (int)(long)p); + return 5/j; // expected-warning {{Division by a tainted value, possibly zero}} +} + |

