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
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 1f37532..c0a0aad 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -1291,6 +1291,10 @@
   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);