summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/misc-ps.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/misc-ps.m')
-rw-r--r--clang/test/Analysis/misc-ps.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m
index 20a14f95c21..04e6555dd1b 100644
--- a/clang/test/Analysis/misc-ps.m
+++ b/clang/test/Analysis/misc-ps.m
@@ -165,3 +165,16 @@ my_test_mm_movepi64_pi64(__a128vector a) {
}
@end
+// PR 3770
+char pr3770(int x) {
+ int y = x & 0x2;
+ char *p = 0;
+ if (y == 1)
+ p = "hello";
+
+ if (y == 1)
+ return p[0]; // no-warning
+
+ return 'a';
+}
+
OpenPOWER on IntegriCloud