Make the ".*" operator work correctly when the base is a prvalue and the field has a non-trivial copy constructor.  PR13097.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158578 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 5bbf750..3de4b57 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -2376,6 +2376,10 @@
   if (isa<MemberExpr>(E))
     return false;
 
+  if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E))
+    if (BO->isPtrMemOp())
+      return false;
+
   // - opaque values (all)
   if (isa<OpaqueValueExpr>(E))
     return false;