summaryrefslogtreecommitdiffstats
path: root/test/Analysis/misc-ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/misc-ps.c')
-rw-r--r--test/Analysis/misc-ps.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps.c b/test/Analysis/misc-ps.c
index ef89321..5369ab1 100644
--- a/test/Analysis/misc-ps.c
+++ b/test/Analysis/misc-ps.c
@@ -151,3 +151,15 @@ int rdar_12075238_(unsigned long count) {
return 0;
}
+// Test that we handle an uninitialized value within a logical expression.
+void PR14635(int *p) {
+ int a = 0, b;
+ *p = a || b; // expected-warning {{Assigned value is garbage or undefined}}
+}
+
+// Test handling floating point values with unary '!'.
+int PR14634(int x) {
+ double y = (double)x;
+ return !y;
+}
+
OpenPOWER on IntegriCloud