diff options
author | John McCall <rjmccall@apple.com> | 2011-11-10 05:35:25 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-10 05:35:25 +0000 |
commit | 80ee6e878a169e6255d4686a91bb696151ff229f (patch) | |
tree | 12ca8bc10434c075802cc4c31339a5fbd51ca179 /lib/AST/Decl.cpp | |
parent | 1445bbacf4c8de5f208ff4ccb302424a4d9e233e (diff) |
There's no good reason to track temporaries in ExprWithCleanups,
but it is sometimes useful to track blocks. Do so. Also
optimize the storage of these expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index c766577ab0..095491aafe 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1412,21 +1412,6 @@ Expr *ParmVarDecl::getDefaultArg() { return Arg; } -unsigned ParmVarDecl::getNumDefaultArgTemporaries() const { - if (const ExprWithCleanups *E = dyn_cast<ExprWithCleanups>(getInit())) - return E->getNumTemporaries(); - - return 0; -} - -CXXTemporary *ParmVarDecl::getDefaultArgTemporary(unsigned i) { - assert(getNumDefaultArgTemporaries() && - "Default arguments does not have any temporaries!"); - - ExprWithCleanups *E = cast<ExprWithCleanups>(getInit()); - return E->getTemporary(i); -} - SourceRange ParmVarDecl::getDefaultArgRange() const { if (const Expr *E = getInit()) return E->getSourceRange(); |