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 | 3c6bd2ad386590ffcaa65e49a36e7976be82062d (patch) | |
tree | 6edef04ecbd5f4d81ce3e49d2981c41980763c4a /clang/lib/AST/Expr.cpp | |
parent | f491ee2ea68585b7facadc03d4b7440e59e0bd81 (diff) | |
download | bcm5719-llvm-3c6bd2ad386590ffcaa65e49a36e7976be82062d.tar.gz bcm5719-llvm-3c6bd2ad386590ffcaa65e49a36e7976be82062d.zip |
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.
llvm-svn: 122904
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 3a71883419f..c1dc5326e59 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/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, |