summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/misc-ps-cxx0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/misc-ps-cxx0x.cpp')
-rw-r--r--clang/test/Analysis/misc-ps-cxx0x.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-cxx0x.cpp b/clang/test/Analysis/misc-ps-cxx0x.cpp
index 598fea2bb7e..1089fa7f9a5 100644
--- a/clang/test/Analysis/misc-ps-cxx0x.cpp
+++ b/clang/test/Analysis/misc-ps-cxx0x.cpp
@@ -9,3 +9,15 @@ void test_analyzer_working() {
*p = 0xDEADBEEF; // expected-warning {{null}}
}
+// Test that pointer-to-member functions don't cause the analyzer
+// to crash.
+struct RDar10243398 {
+ void bar(int x);
+};
+
+typedef void (RDar10243398::*RDar10243398MemberFn)(int x);
+
+void test_rdar10243398(RDar10243398 *p) {
+ RDar10243398MemberFn q = &RDar10243398::bar;
+ ((*p).*(q))(1);
+}
OpenPOWER on IntegriCloud