summaryrefslogtreecommitdiffstats
path: root/clang/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
commite80ccac2cbd5536246de00814f309d73ad121df4 (patch)
tree99ff9258b0169f95fd744a3925a068fc457bebfb /clang/lib/AST/Expr.cpp
parent1c83debc36c16b69d7cb79f90e991c64bdfd5447 (diff)
downloadbcm5719-llvm-e80ccac2cbd5536246de00814f309d73ad121df4.tar.gz
bcm5719-llvm-e80ccac2cbd5536246de00814f309d73ad121df4.zip
Call MaybeBindToTemporary for overloaded binary and unary operators.
llvm-svn: 79173
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index b92ecac6a31..fa5ce9f0478 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud