summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-03 17:17:50 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-03 17:17:50 +0000
commite8e9dd624c88a05cf0dee727d5555464e6833902 (patch)
treecd6f3ab5b41b3d40f1bd3b79b6d62ca6d136328e /clang/lib/AST/ExprClassification.cpp
parent67cce9b13575240704f0305dcf4f9f0401f05f51 (diff)
downloadbcm5719-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.cpp3
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");
OpenPOWER on IntegriCloud