diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-19 04:51:14 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-19 04:51:14 +0000 |
commit | cc4576225324a683f446d2f0c60ed90fe34ee7a5 (patch) | |
tree | aa3c22cd9c786e48cb36580931ca80dd4b89059d /clang/test/Analysis/casts.c | |
parent | 707cbc41264e76bbc47a22ee7c54036e32b545d1 (diff) | |
download | bcm5719-llvm-cc4576225324a683f446d2f0c60ed90fe34ee7a5.tar.gz bcm5719-llvm-cc4576225324a683f446d2f0c60ed90fe34ee7a5.zip |
If the SymbolicRegion was cast to another type, use that type to create the
ElementRegion.
llvm-svn: 73754
Diffstat (limited to 'clang/test/Analysis/casts.c')
-rw-r--r-- | clang/test/Analysis/casts.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/casts.c b/clang/test/Analysis/casts.c index eac0bd3a011..d47184fb5f5 100644 --- a/clang/test/Analysis/casts.c +++ b/clang/test/Analysis/casts.c @@ -27,3 +27,12 @@ int f1(struct s **pval) { char c = (unsigned char) *tbool; // Should use cast-to type to create symbol. } +void f2(const char *str) { + unsigned char ch, cl, *p; + + p = (unsigned char *)str; + ch = *p++; // use cast-to type 'unsigned char' to create element region. + cl = *p++; + if(!cl) + cl = 'a'; +} |