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/StmtPrinter.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/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 6bbe8f9cd9b..cc905267369 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1246,6 +1246,11 @@ void StmtPrinter::VisitCXXNoexceptExpr(CXXNoexceptExpr *E) { OS << ")"; } +void StmtPrinter::VisitPackExpansionExpr(clang::PackExpansionExpr *E) { + PrintExpr(E->getPattern()); + OS << "..."; +} + // Obj-C void StmtPrinter::VisitObjCStringLiteral(ObjCStringLiteral *Node) { |