summaryrefslogtreecommitdiffstats
path: root/test/Analysis/reinterpret-cast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/reinterpret-cast.cpp')
-rw-r--r--test/Analysis/reinterpret-cast.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/Analysis/reinterpret-cast.cpp b/test/Analysis/reinterpret-cast.cpp
index cb7cbfd..f3b0a7b 100644
--- a/test/Analysis/reinterpret-cast.cpp
+++ b/test/Analysis/reinterpret-cast.cpp
@@ -102,4 +102,17 @@ int radar_13146953(void) {
set_x1(x);
set_x2((void *&)y);
return *x + *y; // no warning
-} \ No newline at end of file
+}
+
+namespace PR25426 {
+ struct Base {
+ int field;
+ };
+
+ struct Derived : Base { };
+
+ void foo(int &p) {
+ Derived &d = (Derived &)(p);
+ d.field = 2;
+ }
+}
OpenPOWER on IntegriCloud