Thanks, I have no idea how I missed it.
On Fri, Jun 6, 2014 at 9:16 PM, Timur Iskhodzhanov <[email protected]> wrote: > > 2014-06-06 6:59 GMT+04:00 Nikola Smiljanic <[email protected]>: > >> Modified: cfe/trunk/lib/Parse/ParseTemplate.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTemplate.cpp?rev= >> 210304&r1=210303&r2=210304&view=diff >> >> ============================================================================== >> --- cfe/trunk/lib/Parse/ParseTemplate.cpp (original) >> +++ cfe/trunk/lib/Parse/ParseTemplate.cpp Thu Jun 5 21:58:59 2014 >> @@ -498,6 +498,11 @@ Decl *Parser::ParseTypeParameter(unsigne >> return nullptr; >> } >> >> + // Recover from misplaced ellipsis. >> + bool AlreadyHasEllipsis = EllipsisLoc.isValid(); >> + if (TryConsumeToken(tok::ellipsis, EllipsisLoc)) >> + DiagnoseMisplacedEllipsis(EllipsisLoc, NameLoc, AlreadyHasEllipsis, >> true); >> + >> // Grab a default argument (if available). >> // Per C++0x [basic.scope.pdecl]p9, we parse the default argument >> before >> // we introduce the type parameter into the local scope. >> @@ -507,9 +512,9 @@ Decl *Parser::ParseTypeParameter(unsigne >> DefaultArg = ParseTypeName(/*Range=*/nullptr, >> Declarator::TemplateTypeArgContext).get(); >> >> - return Actions.ActOnTypeParameter(getCurScope(), TypenameKeyword, >> Ellipsis, >> - EllipsisLoc, KeyLoc, ParamName, >> NameLoc, >> - Depth, Position, EqualLoc, >> DefaultArg); >> + return Actions.ActOnTypeParameter(getCurScope(), TypenameKeyword, >> EllipsisLoc, >> + KeyLoc, ParamName, NameLoc, Depth, >> Position, >> + EqualLoc, DefaultArg); >> } >> > > FYI > ../tools/clang/lib/Parse/ParseTemplate.cpp: In member function > ‘clang::Decl* clang::Parser::ParseTypeParameter(unsigned int, unsigned > int)’: > ../tools/clang/lib/Parse/ParseTemplate.cpp:476:8: warning: variable > ‘Ellipsis’ set but not used [-Wunused-but-set-variable] > bool Ellipsis = false; > ^ > > fixed in r210324. >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
