Reviewers: a.sidorin, martong
Reviewed By: martong
Subscribers: rnkovacs, martong, cfe-commits
Differential Revision: https://reviews.llvm.org/D50792
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339919
91177308-0d34-0410-b5e6-
96231b3b80d8
--- /dev/null
+struct S {
+ int i;
+};
+
+int S::*iptr() {
+ return &S::i;
+}
--- /dev/null
+// RUN: clang-import-test -dump-ast -import %S/Inputs/S.cpp -expression %s | FileCheck %s
+
+// CHECK: VarDecl
+// CHECK-SAME: int S::*
+// CHECK-NEXT: CallExpr
+// CHECK-NEXT: ImplicitCastExpr
+// CHECK-SAME: int S::*(*)()
+// CHECK-NEXT: DeclRefExpr
+// CHECK-SAME: int S::*()
+
+void expr() {
+ int S::*p = iptr();
+ S s;
+ s.i = 3;
+ int i = s.*p;
+}