diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-01-03 17:17:50 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-01-03 17:17:50 +0000 |
| commit | be230c36e32142cbdcdbe9c97511d097beeecbab (patch) | |
| tree | a9c32a8f84720ac278c7bd11ab45b5d12859a7a0 /lib/AST/ExprClassification.cpp | |
| parent | 9917401b32f26b16ae6053d07903ac147b64a43b (diff) | |
| download | clang-be230c36e32142cbdcdbe9c97511d097beeecbab.tar.gz clang-be230c36e32142cbdcdbe9c97511d097beeecbab.tar.bz2 clang-be230c36e32142cbdcdbe9c97511d097beeecbab.tar.xz | |
Implement support for pack expansions whose pattern is a non-type
template argument (described by an expression, of course). For
example:
template<int...> struct int_tuple { };
template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};
It also lays the foundation for pack expansions in an initializer-list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprClassification.cpp')
| -rw-r--r-- | lib/AST/ExprClassification.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/ExprClassification.cpp b/lib/AST/ExprClassification.cpp index 4cf393d788..f437804c29 100644 --- a/lib/AST/ExprClassification.cpp +++ b/lib/AST/ExprClassification.cpp @@ -304,6 +304,9 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) { case Expr::CXXUuidofExprClass: return Cl::CL_LValue; + + case Expr::PackExpansionExprClass: + return ClassifyInternal(Ctx, cast<PackExpansionExpr>(E)->getPattern()); } llvm_unreachable("unhandled expression kind in classification"); |
