aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/check-increment.c
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-11-11 14:15:57 +0000
committerSteve Naroff <snaroff@apple.com>2007-11-11 14:15:57 +0000
commitd848a3867794f4a9297bced70178834936e59d3d (patch)
tree623c0e75dbbeaeabe19d91110bbbcd3b99af8eef /test/Sema/check-increment.c
parentc43d868355374d48296ad3be2c9c536698a5e9a8 (diff)
Make sure Sema::CheckIncrementDecrementOperand() removes typedefs when doing it's analysis.
Thanks to Seo Sanghyeon for his excellent (first) bug fix! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/check-increment.c')
-rw-r--r--test/Sema/check-increment.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Sema/check-increment.c b/test/Sema/check-increment.c
new file mode 100644
index 0000000000..4447feb0b8
--- /dev/null
+++ b/test/Sema/check-increment.c
@@ -0,0 +1,10 @@
+// RUN: clang -fsyntax-only -verify %s
+
+#include <stdio.h>
+typedef int *pint;
+int main() {
+ int a[5] = {0};
+ pint p = a;
+ p++;
+ printf("%d\n", *p);
+}