summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/casts.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/casts.c')
-rw-r--r--clang/test/Analysis/casts.c9
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';
+}
OpenPOWER on IntegriCloud