[analyzer] Fix crash when analyzing C++ code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126025 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/cxx-crashes.cpp b/test/Analysis/cxx-crashes.cpp
index ae2f3cb..c9775df 100644
--- a/test/Analysis/cxx-crashes.cpp
+++ b/test/Analysis/cxx-crashes.cpp
@@ -14,6 +14,10 @@
return !false;
}
+void *f4(int* w) {
+ return reinterpret_cast<void*&>(w);
+}
+
namespace {
struct A { };
@@ -27,3 +31,15 @@
}
}
+
+namespace {
+
+struct S {
+ void *p;
+};
+
+void *f(S* w) {
+ return &reinterpret_cast<void*&>(*w);
+}
+
+}