Discussion:
[Cocci] Blocks Support?
Mitchell Cuddie
2018-04-17 14:32:42 UTC
Permalink
Has anyone looked at supporting the blocks extension in Coccinelle?
https://clang.llvm.org/docs/BlockLanguageSpec.html

There are a number of large projects like WebKit that could make use of
Coccinelle if it could parse the code. Any thoughts?

Mitchell Cuddie
Julia Lawall
2018-04-17 14:40:22 UTC
Permalink
Post by Mitchell Cuddie
Has anyone looked at supporting the blocks extension in Coccinelle?
https://clang.llvm.org/docs/BlockLanguageSpec.html
There are a number of large projects like WebKit that could make use of
Coccinelle if it could parse the code. Any thoughts?
Looking extremely quickly it looks like it could be possible. Do you just
want the parser not to crash or to change this kind of code. Could you
send a small typical example?

julia
Julia Lawall
2018-05-05 18:16:09 UTC
Permalink
Post by Julia Lawall
Post by Mitchell Cuddie
Has anyone looked at supporting the blocks extension in Coccinelle?
https://clang.llvm.org/docs/BlockLanguageSpec.html
There are a number of large projects like WebKit that could make use of
Coccinelle if it could parse the code. Any thoughts?
Looking extremely quickly it looks like it could be possible. Do you just
want the parser not to crash or to change this kind of code. Could you
send a small typical example?
Currently, Coccinelle doesn't support nested function definitions.

Are these blocks used heavily in the code you are interested in? If
Coccinelle can't parse one function, it will just move on to the next one.

julia
Mitchell Cuddie
2018-05-09 15:48:09 UTC
Permalink
Julia,

The original patch I was looking at uses nested functions heavily and required modifying them. I will look for a different strategy on this patch and see if there is a better example elsewhere.

Mitchell
Post by Julia Lawall
Post by Julia Lawall
Post by Mitchell Cuddie
Has anyone looked at supporting the blocks extension in Coccinelle?
https://clang.llvm.org/docs/BlockLanguageSpec.html
There are a number of large projects like WebKit that could make use of
Coccinelle if it could parse the code. Any thoughts?
Looking extremely quickly it looks like it could be possible. Do you just
want the parser not to crash or to change this kind of code. Could you
send a small typical example?
Currently, Coccinelle doesn't support nested function definitions.
Are these blocks used heavily in the code you are interested in? If
Coccinelle can't parse one function, it will just move on to the next one.
julia
Continue reading on narkive:
Loading...