summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/null-deref-ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/null-deref-ps.c')
-rw-r--r--clang/test/Analysis/null-deref-ps.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c
index b320e8dd191..fe94d6fe7c8 100644
--- a/clang/test/Analysis/null-deref-ps.c
+++ b/clang/test/Analysis/null-deref-ps.c
@@ -213,3 +213,10 @@ void f12(HF12ITEM i, char *q) {
*p = 1; // no-warning
}
+// Test handling of translating between integer "pointers" and back.
+void f13() {
+ int *x = 0;
+ if (((((int) x) << 2) + 1) >> 1) *x = 1; // no-warning
+}
+
+
OpenPOWER on IntegriCloud