From 13ffdd86b93ff8bf5d26bca55119982c899bb5ce Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 15 Jun 2012 23:51:06 +0000 Subject: Make the ".*" operator work correctly when the base is a prvalue and the field has a non-trivial copy constructor. PR13097. llvm-svn: 158578 --- clang/lib/AST/Expr.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/AST/Expr.cpp') diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 5bbf7503f8e..3de4b5771a2 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -2376,6 +2376,10 @@ bool Expr::isTemporaryObject(ASTContext &C, const CXXRecordDecl *TempTy) const { if (isa(E)) return false; + if (const BinaryOperator *BO = dyn_cast(E)) + if (BO->isPtrMemOp()) + return false; + // - opaque values (all) if (isa(E)) return false; -- cgit v1.2.3