Summary: This was causing a crash, because when trying to create a procname from a block at that point we don't have the block return type, which is needed for the name. I don't understand why BlockDecl doesn't contain the type, but I looked again and it doesn't (also in clang). So in general we need to pass it from the context, but that's not possible in this case. Also, one could argue that such a block is not a method from the struct, since it's just a block that is assigned to a field as initialization. Reviewed By: skcho Differential Revision: D17575197 fbshipit-source-id: 3974ead3fmaster
parent
7ec2830d92
commit
0eccdb25dc
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
typedef BOOL (^ExperimentBlock)(void);
|
||||||
|
|
||||||
|
struct Configuration {
|
||||||
|
|
||||||
|
ExperimentBlock block = ^{
|
||||||
|
return NO;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
int main() { return 0; }
|
@ -0,0 +1,14 @@
|
|||||||
|
/* @generated */
|
||||||
|
digraph cfg {
|
||||||
|
"main.fad58de7366495db4650cfefac2fcd61_1" [label="1: Start main\nFormals: \nLocals: \n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
"main.fad58de7366495db4650cfefac2fcd61_1" -> "main.fad58de7366495db4650cfefac2fcd61_3" ;
|
||||||
|
"main.fad58de7366495db4650cfefac2fcd61_2" [label="2: Exit main \n " color=yellow style=filled]
|
||||||
|
|
||||||
|
|
||||||
|
"main.fad58de7366495db4650cfefac2fcd61_3" [label="3: Return Stmt \n *&return:int=0 [line 18, column 14]\n APPLY_ABSTRACTION; [line 18, column 14]\n " shape="box"]
|
||||||
|
|
||||||
|
|
||||||
|
"main.fad58de7366495db4650cfefac2fcd61_3" -> "main.fad58de7366495db4650cfefac2fcd61_2" ;
|
||||||
|
}
|
Loading…
Reference in new issue