diff options
author | John McCall <rjmccall@apple.com> | 2010-12-06 08:20:24 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-06 08:20:24 +0000 |
commit | 4765fa05b5652fcc4356371c2f481d0ea9a1b007 (patch) | |
tree | 82e9de9098859a89427f187c0a7eaae82ab788e2 /lib/AST/Decl.cpp | |
parent | cd940a1e13e588a43973cd7ae33b5c33a3062739 (diff) |
Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index ce76cfb6bb..a8959b8d91 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1176,15 +1176,14 @@ Expr *ParmVarDecl::getDefaultArg() { "Default argument is not yet instantiated!"); Expr *Arg = getInit(); - if (CXXExprWithTemporaries *E = dyn_cast_or_null<CXXExprWithTemporaries>(Arg)) + if (ExprWithCleanups *E = dyn_cast_or_null<ExprWithCleanups>(Arg)) return E->getSubExpr(); return Arg; } unsigned ParmVarDecl::getNumDefaultArgTemporaries() const { - if (const CXXExprWithTemporaries *E = - dyn_cast<CXXExprWithTemporaries>(getInit())) + if (const ExprWithCleanups *E = dyn_cast<ExprWithCleanups>(getInit())) return E->getNumTemporaries(); return 0; @@ -1194,7 +1193,7 @@ CXXTemporary *ParmVarDecl::getDefaultArgTemporary(unsigned i) { assert(getNumDefaultArgTemporaries() && "Default arguments does not have any temporaries!"); - CXXExprWithTemporaries *E = cast<CXXExprWithTemporaries>(getInit()); + ExprWithCleanups *E = cast<ExprWithCleanups>(getInit()); return E->getTemporary(i); } |