Conversation
f0b3a01 to
4a15846
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
a82f534 to
51c20b7
Compare
|
i just realized aro doesn't support lowering to |
22a3bdb to
201fca6
Compare
201fca6 to
a66ae0c
Compare
a295122 to
4f224ce
Compare
73b3cad to
c9e93a3
Compare
|
^ still working on addressing review comments |
34e3c24 to
538b1e1
Compare
| .keyword_forceinline, | ||
| .keyword_forceinline2, | ||
| => { | ||
| try p.err(bad_attr_tok_i, .block_does_not_allow_specifier, .{"function specifier"}); |
There was a problem hiding this comment.
I added this warning in 2750279. You'll probably want to inline typeNameExtra here to handle decl attributes in the type properly:
int (^a)(int) = ^int __attribute__((const)) (int a){
return a;
};907f240 to
6a78430
Compare
40fd610 to
013d4db
Compare
|
uh, wat. different results for block literals depending on os? |
use repr.data directly for the token in attr map undo marking implicit return with implicit-true operand
013d4db to
aa4099b
Compare
| b = ^__attribute((visibility("bad"))) {}; // comment out to show more clang errors below (aro is better) | ||
| b = ^__attribute((aligned(3))) {}; // comment out to show more clang errors below (aro is better) | ||
| b = ^__attribute((format)) {}; // comment out to show more clang errors below (aro is better) | ||
| b = ^__attribute((nonnull(0))) (void *a) {}; // comment out to show more clang errors below (aro is better) |
There was a problem hiding this comment.
uh, wat. different results for block literals depending on os?
on aarch64-linux it's apparently due to this line (i tested in a vm on my macbook, the diagnostics pass with this line commented out and the diagnostic removed from the expected output)
i'm still not sure why this behavior is host-platform-specific...
i'm really busy over the next couple of weeks, but when i have time i'll debug this more
blocked on/part 2 of #969, wip towards closing #825This PR implements parsing of block literals according to the language extension specification by Clang. Caveat: while the spec document specifies that the parameter list may only be omitted when the return type is omitted, Clang actually compiles programs that omit the return type but not the parameter list (excuse the linker error). The behavior here matches that behavior
Additionally, this change makes no attempt to track
__blockvariable references within block bodies, since that's not necessary for the parse to complete, and that extra information would not be used anywhere yet. in the future, when implementing lowering support for blocks, this information tracking can be added