summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-05 21:11:38 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-05 21:11:38 +0000
commit3c6bd2ad386590ffcaa65e49a36e7976be82062d (patch)
tree6edef04ecbd5f4d81ce3e49d2981c41980763c4a /clang/lib/AST/Decl.cpp
parentf491ee2ea68585b7facadc03d4b7440e59e0bd81 (diff)
downloadbcm5719-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/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 5b82ddd7c69..c51d2cdc37c 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1221,6 +1221,10 @@ SourceRange ParmVarDecl::getDefaultArgRange() const {
return SourceRange();
}
+bool ParmVarDecl::isParameterPack() const {
+ return isa<PackExpansionType>(getType());
+}
+
//===----------------------------------------------------------------------===//
// FunctionDecl Implementation
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud