diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-05 21:11:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-05 21:11:38 +0000 |
commit | 1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 (patch) | |
tree | 5f8a42d98e3f99c1ed0020cce5b8020fe574b788 /lib/AST/Expr.cpp | |
parent | 135ffa7375fb5802b92f42774e02d0e6e4c78e5b (diff) |
Add Decl::isParameterPack(), which covers both function and template
parameter packs, along with ParmVarDecl::isParameterPack(), which
looks for function parameter packs. Use these routines to fix some
obvious FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 3a71883419..c1dc5326e5 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -211,11 +211,8 @@ void DeclRefExpr::computeDependence() { // Determine whether this expression contains any unexpanded parameter // packs. // Is the declaration a parameter pack? - if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(D)) { - if (NTTP->isParameterPack()) - ExprBits.ContainsUnexpandedParameterPack = true; - } - // FIXME: Variadic templates function parameter packs. + if (D->isParameterPack()) + ExprBits.ContainsUnexpandedParameterPack = true; } DeclRefExpr::DeclRefExpr(NestedNameSpecifier *Qualifier, |