diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-30 22:47:03 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-30 22:47:03 +0000 |
commit | b27615af9047fa87b7dd6b31582a072d3636acf5 (patch) | |
tree | b8ff7d479764eb7581d3d60a57261d299c3539c2 | |
parent | 88eaf075c56672761b72cc50957db4a35bf24ebd (diff) |
Add RemoveOutermostTemporaryBinding. Not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72644 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/Sema.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index b2540ba2e0..d926fa9c4b 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -1501,6 +1501,17 @@ public: /// 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 { |