summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/misc-ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/misc-ps.c')
-rw-r--r--clang/test/Analysis/misc-ps.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps.c b/clang/test/Analysis/misc-ps.c
index 2d4fdd4637d..0729ce2f775 100644
--- a/clang/test/Analysis/misc-ps.c
+++ b/clang/test/Analysis/misc-ps.c
@@ -36,3 +36,17 @@ int rdar93730392() {
return j;
}
+
+int PR8962 (int *t) {
+ // This should look through the __extension__ no-op.
+ if (__extension__ (t)) return 0;
+ return *t; // expected-warning {{null pointer}}
+}
+
+int PR8962_b (int *t) {
+ // This should still ignore the nested casts
+ // which aren't handled by a single IgnoreParens()
+ if (((int)((int)t))) return 0;
+ return *t; // expected-warning {{null pointer}}
+}
+
OpenPOWER on IntegriCloud