diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-06-15 16:59:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-06-15 16:59:29 +0000 |
commit | 7efd007cfb84e2faa4f5e074178eca298e31bd61 (patch) | |
tree | e25f770a08e0247fe23325b5094f6810a34fea9f /clang/lib/Parse/ParseExpr.cpp | |
parent | 25c40e5a5b0cf827eb05d4b32c9eaf708daf4e5d (diff) | |
download | bcm5719-llvm-7efd007cfb84e2faa4f5e074178eca298e31bd61.tar.gz bcm5719-llvm-7efd007cfb84e2faa4f5e074178eca298e31bd61.zip |
Check the parameter lists and return type of both blocks and lambdas
for unexpanded parameter packs. Fixes the crash-on-invalid in
PR13117.
llvm-svn: 158525
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index cc5e1932e00..f9c148d810a 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/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()); } |