diff options
author | Mike Stump <mrs@apple.com> | 2009-04-29 21:40:37 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-04-29 21:40:37 +0000 |
commit | 6c92fa75e62937f9738696840efcb258560f4568 (patch) | |
tree | 35b9cd76fa5c10c396c07f8ab37fdb18eab83d1b /lib/Parse/ParseExpr.cpp | |
parent | 298862dbcc0313766c8d2e25f836b62efcc75c51 (diff) |
Fixup Sema and CodeGen for block literal attributes when the return
type and argument types are missing, and let return type deduction
happen before we give errors for returning from a noreturn block.
Radar 6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 1f37532d71..c0a0aad175 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1291,6 +1291,10 @@ void Parser::ParseBlockId() { Declarator DeclaratorInfo(DS, Declarator::BlockLiteralContext); ParseDeclarator(DeclaratorInfo); + // We do this for: ^ __attribute__((noreturn)) {, as DS has the attributes. + DeclaratorInfo.AddAttributes(DS.TakeAttributes(), + SourceLocation()); + if (Tok.is(tok::kw___attribute)) { SourceLocation Loc; AttributeList *AttrList = ParseAttributes(&Loc); |