summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/inner-pointer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/inner-pointer.cpp')
-rw-r--r--clang/test/Analysis/inner-pointer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Analysis/inner-pointer.cpp b/clang/test/Analysis/inner-pointer.cpp
index 6f9c8a8e8a0..fb8cc8ec33e 100644
--- a/clang/test/Analysis/inner-pointer.cpp
+++ b/clang/test/Analysis/inner-pointer.cpp
@@ -382,3 +382,13 @@ const char *escape_via_return_local() {
// expected-note@-1 {{Inner pointer invalidated by call to destructor}}
} // expected-warning {{Use of memory after it is freed}}
// expected-note@-1 {{Use of memory after it is freed}}
+
+
+char *c();
+class A {};
+
+void no_CXXRecordDecl() {
+ A a, *b;
+ *(void **)&b = c() + 1;
+ *b = a; // no-crash
+}
OpenPOWER on IntegriCloud