summaryrefslogtreecommitdiffstats
path: root/test/Analysis/stack-addr-ps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/stack-addr-ps.cpp')
-rw-r--r--test/Analysis/stack-addr-ps.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/stack-addr-ps.cpp b/test/Analysis/stack-addr-ps.cpp
index b09e435..b21a03d 100644
--- a/test/Analysis/stack-addr-ps.cpp
+++ b/test/Analysis/stack-addr-ps.cpp
@@ -84,3 +84,9 @@ struct TS {
return x;
}
};
+
+// rdar://11345441
+int* f5() {
+ int& i = i; // expected-warning {{Assigned value is garbage or undefined}} expected-note {{binding reference variable 'i' here}}
+ return &i; // expected-warning {{address of stack memory associated with local variable 'i' returned}}
+}
OpenPOWER on IntegriCloud