diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-01-03 22:36:02 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-01-03 22:36:02 +0000 |
| commit | 752a595655d3dfcdbffb44b4d6a94275c550e7fe (patch) | |
| tree | 8e1d4f1312ffa2fa438266a66a7b747cc6631ac8 /clang/lib/Parse | |
| parent | d5756a609dbb14dff99cd83a0a50042da5275233 (diff) | |
| download | bcm5719-llvm-752a595655d3dfcdbffb44b4d6a94275c550e7fe.tar.gz bcm5719-llvm-752a595655d3dfcdbffb44b4d6a94275c550e7fe.zip | |
Implement pack expansions whose pattern is a base-specifier.
llvm-svn: 122782
Diffstat (limited to 'clang/lib/Parse')
| -rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index fe2390f1aa0..adbecdc4a94 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -1196,13 +1196,20 @@ Parser::BaseResult Parser::ParseBaseSpecifier(Decl *ClassDecl) { if (BaseType.isInvalid()) return true; + // Parse the optional ellipsis (for a pack expansion). The ellipsis is + // actually part of the base-specifier-list grammar productions, but we + // parse it here for convenience. + SourceLocation EllipsisLoc; + if (Tok.is(tok::ellipsis)) + EllipsisLoc = ConsumeToken(); + // Find the complete source range for the base-specifier. SourceRange Range(StartLoc, EndLocation); // Notify semantic analysis that we have parsed a complete // base-specifier. return Actions.ActOnBaseSpecifier(ClassDecl, Range, IsVirtual, Access, - BaseType.get(), BaseLoc); + BaseType.get(), BaseLoc, EllipsisLoc); } /// getAccessSpecifierIfPresent - Determine whether the next token is |

