bool hasAnyExceptionSpec,
ActionBase::TypeTy **Exceptions,
SourceRange *ExceptionRanges,
- unsigned NumExceptions, SourceLocation Loc,
+ unsigned NumExceptions,
+ SourceLocation LPLoc, SourceLocation RPLoc,
Declarator &TheDeclarator);
/// getBlockPointer - Return a DeclaratorChunk for a block.
delete AttrList;
}
- SourceLocation Loc = ConsumeParen(); // Eat the closing ')'.
+ SourceLocation RParenLoc = ConsumeParen(); // Eat the closing ')'.
+ SourceLocation EndLoc = RParenLoc;
// cv-qualifier-seq[opt].
DeclSpec DS;
if (getLang().CPlusPlus) {
ParseTypeQualifierListOpt(DS, false /*no attributes*/);
if (!DS.getSourceRange().getEnd().isInvalid())
- Loc = DS.getSourceRange().getEnd();
+ EndLoc = DS.getSourceRange().getEnd();
// Parse exception-specification[opt].
if (Tok.is(tok::kw_throw)) {
hasExceptionSpec = true;
ThrowLoc = Tok.getLocation();
- ParseExceptionSpecification(Loc, Exceptions, ExceptionRanges,
+ ParseExceptionSpecification(EndLoc, Exceptions, ExceptionRanges,
hasAnyExceptionSpec);
assert(Exceptions.size() == ExceptionRanges.size() &&
"Produced different number of exception types and ranges.");
Exceptions.data(),
ExceptionRanges.data(),
Exceptions.size(),
- LParenLoc, D),
- Loc);
+ LParenLoc, RParenLoc, D),
+ EndLoc);
return;
}
PrototypeScope.Exit();
// If we have the closing ')', eat it.
- SourceLocation Loc = MatchRHSPunctuation(tok::r_paren, LParenLoc);
+ SourceLocation RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);
+ SourceLocation EndLoc = RParenLoc;
DeclSpec DS;
bool hasExceptionSpec = false;
// Parse cv-qualifier-seq[opt].
ParseTypeQualifierListOpt(DS, false /*no attributes*/);
if (!DS.getSourceRange().getEnd().isInvalid())
- Loc = DS.getSourceRange().getEnd();
+ EndLoc = DS.getSourceRange().getEnd();
// Parse exception-specification[opt].
if (Tok.is(tok::kw_throw)) {
hasExceptionSpec = true;
ThrowLoc = Tok.getLocation();
- ParseExceptionSpecification(Loc, Exceptions, ExceptionRanges,
+ ParseExceptionSpecification(EndLoc, Exceptions, ExceptionRanges,
hasAnyExceptionSpec);
assert(Exceptions.size() == ExceptionRanges.size() &&
"Produced different number of exception types and ranges.");
hasAnyExceptionSpec,
Exceptions.data(),
ExceptionRanges.data(),
- Exceptions.size(), LParenLoc, D),
- Loc);
+ Exceptions.size(),
+ LParenLoc, RParenLoc, D),
+ EndLoc);
}
/// ParseFunctionDeclaratorIdentifierList - While parsing a function declarator
/*TypeQuals*/0,
/*exception*/false,
SourceLocation(), false, 0, 0, 0,
- LParenLoc, D),
+ LParenLoc, RLoc, D),
RLoc);
}
Declarator D(DS, Declarator::BlockContext);
D.AddTypeInfo(DeclaratorChunk::getFunction(false, false, SourceLocation(), 0,
0, 0, false, SourceLocation(),
- false, 0,0,0, Loc, D),
+ false, 0,0,0, Loc, Loc, D),
SourceLocation());
D.SetIdentifier(&II, Loc);