aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-06-15 16:59:29 +0000
committerDouglas Gregor <dgregor@apple.com>2012-06-15 16:59:29 +0000
commit03f1eb031b84e93415b792c4b45d8da71c88e92d (patch)
tree7c8a1c559c93d606eafc678fc1e05d7b74ea9f0f /lib/Parse/ParseExpr.cpp
parent111684eea03ea162897134f6371a2ea06cd3e456 (diff)
Check the parameter lists and return type of both blocks and lambdas
for unexpanded parameter packs. Fixes the crash-on-invalid in PR13117. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index cc5e1932e0..f9c148d810 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -2299,7 +2299,7 @@ bool Parser::ParseExpressionList(SmallVectorImpl<Expr*> &Exprs,
/// [clang] block-id:
/// [clang] specifier-qualifier-list block-declarator
///
-void Parser::ParseBlockId() {
+void Parser::ParseBlockId(SourceLocation CaretLoc) {
if (Tok.is(tok::code_completion)) {
Actions.CodeCompleteOrdinaryName(getCurScope(), Sema::PCC_Type);
return cutOffParsing();
@@ -2319,7 +2319,7 @@ void Parser::ParseBlockId() {
MaybeParseGNUAttributes(DeclaratorInfo);
// Inform sema that we are starting a block.
- Actions.ActOnBlockArguments(DeclaratorInfo, getCurScope());
+ Actions.ActOnBlockArguments(CaretLoc, DeclaratorInfo, getCurScope());
}
/// ParseBlockLiteralExpression - Parse a block literal, which roughly looks
@@ -2376,9 +2376,9 @@ ExprResult Parser::ParseBlockLiteralExpression() {
MaybeParseGNUAttributes(ParamInfo);
// Inform sema that we are starting a block.
- Actions.ActOnBlockArguments(ParamInfo, getCurScope());
+ Actions.ActOnBlockArguments(CaretLoc, ParamInfo, getCurScope());
} else if (!Tok.is(tok::l_brace)) {
- ParseBlockId();
+ ParseBlockId(CaretLoc);
} else {
// Otherwise, pretend we saw (void).
ParsedAttributes attrs(AttrFactory);
@@ -2399,7 +2399,7 @@ ExprResult Parser::ParseBlockLiteralExpression() {
MaybeParseGNUAttributes(ParamInfo);
// Inform sema that we are starting a block.
- Actions.ActOnBlockArguments(ParamInfo, getCurScope());
+ Actions.ActOnBlockArguments(CaretLoc, ParamInfo, getCurScope());
}