[cfe-commits] r72644 - /cfe/trunk/lib/Sema/Sema.h
Anders Carlsson
andersca at mac.com
Sat May 30 15:47:03 PDT 2009
Author: andersca
Date: Sat May 30 17:47:03 2009
New Revision: 72644
URL: http://llvm.org/viewvc/llvm-project?rev=72644&view=rev
Log:
Add RemoveOutermostTemporaryBinding. Not used yet.
Modified:
cfe/trunk/lib/Sema/Sema.h
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=72644&r1=72643&r2=72644&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Sat May 30 17:47:03 2009
@@ -1501,6 +1501,17 @@
/// it simply returns the passed in expression.
OwningExprResult MaybeBindToTemporary(Expr *E);
+ /// RemoveOutermostTemporaryBinding - Remove and destroy the outermost
+ /// CXXBindToTemporaryExpr if necessary. This is used when we want to not
+ /// destroy a temporary when a full expression has been evaluated.
+ /// For example:
+ ///
+ /// const T& t = T(10, T());
+ ///
+ /// Here the outermost T needs to be destroyed when t goes out of scope, but
+ /// the innermost T needs to be destroyed when the expr has been evaluated.
+ Expr *RemoveOutermostTemporaryBinding(Expr *E);
+
/// InitializationKind - Represents which kind of C++ initialization
/// [dcl.init] a routine is to perform.
enum InitializationKind {
More information about the cfe-commits
mailing list