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 | e8e9dd624c88a05cf0dee727d5555464e6833902 (patch) | |
tree | cd6f3ab5b41b3d40f1bd3b79b6d62ca6d136328e /clang/lib/AST/ExprClassification.cpp | |
parent | 67cce9b13575240704f0305dcf4f9f0401f05f51 (diff) | |
download | bcm5719-llvm-e8e9dd624c88a05cf0dee727d5555464e6833902.tar.gz bcm5719-llvm-e8e9dd624c88a05cf0dee727d5555464e6833902.zip |
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.
llvm-svn: 122751
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r-- | clang/lib/AST/ExprClassification.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index 4cf393d788f..f437804c291 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/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"); |