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 | 5d41378146ad784843bedd870ffa6dda3966edc4 (patch) | |
| tree | 7a38cf1ba1b6b307d8196f44299ada5f671f0ba7 /clang/lib/AST/Decl.cpp | |
| parent | fb212de06ded3800d99fcf804c2ce8dbafe7dbf6 (diff) | |
| download | bcm5719-llvm-5d41378146ad784843bedd870ffa6dda3966edc4.tar.gz bcm5719-llvm-5d41378146ad784843bedd870ffa6dda3966edc4.zip | |
Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index ce76cfb6bb8..a8959b8d91c 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/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); } |

