aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-16 04:11:06 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-16 04:11:06 +0000
commit2d46eb21eb2c904831b0e9f75ab3523384c70e66 (patch)
tree2b27b9c9df957e93bb3e8b9d4a9470e0222bf355 /lib/AST/Expr.cpp
parenta303f9eab9ceb356a24d84e178d079f0d41ad8d4 (diff)
Call MaybeBindToTemporary for overloaded binary and unary operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r--lib/AST/Expr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index b92ecac6a3..fa5ce9f047 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -588,6 +588,9 @@ bool Expr::isUnusedResultAWarning(SourceLocation &Loc, SourceRange &R1,
// effects (e.g. a placement new with an uninitialized POD).
case CXXDeleteExprClass:
return false;
+ case CXXBindTemporaryExprClass:
+ return cast<CXXBindTemporaryExpr>(this)
+ ->getSubExpr()->isUnusedResultAWarning(Loc, R1, R2);
case CXXExprWithTemporariesClass:
return cast<CXXExprWithTemporaries>(this)
->getSubExpr()->isUnusedResultAWarning(Loc, R1, R2);