[cfe-commits] r93874 - /cfe/trunk/test/Analysis/misc-ps.m
Zhongxing Xu
xuzhongxing at gmail.com
Tue Jan 19 04:12:00 PST 2010
Author: zhongxingxu
Date: Tue Jan 19 06:11:55 2010
New Revision: 93874
URL: http://llvm.org/viewvc/llvm-project?rev=93874&view=rev
Log:
Add test case.
Modified:
cfe/trunk/test/Analysis/misc-ps.m
Modified: cfe/trunk/test/Analysis/misc-ps.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/misc-ps.m?rev=93874&r1=93873&r2=93874&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/misc-ps.m (original)
+++ cfe/trunk/test/Analysis/misc-ps.m Tue Jan 19 06:11:55 2010
@@ -811,3 +811,29 @@
return x % y; // expected-warning{{The right operand of '%' is a garbage value}}
}
+struct trie {
+ struct trie* next;
+};
+
+struct kwset {
+ struct trie *trie;
+ unsigned char delta[10];
+ struct trie* next[10];
+ int d;
+};
+
+typedef struct trie trie_t;
+typedef struct kwset kwset_t;
+
+void f(kwset_t *kws, char const *p, char const *q) {
+ struct trie const *trie;
+ struct trie * const *next = kws->next;
+ register unsigned char c;
+ register char const *end = p;
+ register char const *lim = q;
+ register int d = 1;
+ register unsigned char const *delta = kws->delta;
+
+ d = delta[c = (end+=d)[-1]]; // no-warning
+ trie = next[c];
+}
More information about the cfe-commits
mailing list