Index: lib/Parse/ParseExpr.cpp =================================================================== --- lib/Parse/ParseExpr.cpp +++ lib/Parse/ParseExpr.cpp @@ -2751,6 +2751,7 @@ // Parse the block-declarator. Declarator DeclaratorInfo(DS, Declarator::BlockLiteralContext); + DeclaratorInfo.setFunctionDefinitionKind(FDK_Definition); ParseDeclarator(DeclaratorInfo); MaybeParseGNUAttributes(DeclaratorInfo); @@ -2789,6 +2790,7 @@ // Parse the return type if present. DeclSpec DS(AttrFactory); Declarator ParamInfo(DS, Declarator::BlockLiteralContext); + ParamInfo.setFunctionDefinitionKind(FDK_Definition); // FIXME: Since the return type isn't actually parsed, it can't be used to // fill ParamInfo with an initial valid range, so do it manually. ParamInfo.SetSourceRange(SourceRange(Tok.getLocation(), Tok.getLocation())); Index: test/Sema/warn-strict-prototypes.m =================================================================== --- test/Sema/warn-strict-prototypes.m +++ test/Sema/warn-strict-prototypes.m @@ -14,7 +14,8 @@ void (^block)() = // expected-warning {{this function declaration is not a prototype}} ^void(int arg) { // no warning }; - void (^block2)(void) = // no warning - ^void() { // expected-warning {{this function declaration is not a prototype}} + void (^block2)(void) = ^void() { // no warning + }; + void (^block3)(void) = ^ { // no warning }; }