Skip to content
Snippets Groups Projects
Commit e80dbe06 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[Instantiate] Do not fail on function pointers

parent 12efc4cd
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ PLUGIN_CMO := \
PLUGIN_DISTRIBUTED := $(PLUGIN_ENABLE)
PLUGIN_DISTRIB_EXTERNAL:= Makefile.in configure.ac configure
#PLUGIN_NO_DEFAULT_TEST := no
PLUGIN_TESTS_DIRS := string stdlib options api
PLUGIN_TESTS_DIRS := string stdlib options api plugin
################
# Generic part #
......
/* run.config
OPT: -instantiate
*/
void foo(void (* bar)()){
(*bar)();
}
\ No newline at end of file
[kernel] Parsing tests/plugin/function_pointers.i (no preprocessing)
......@@ -104,7 +104,8 @@ class transformer = object(self)
| Not_found -> (fct, args)
method! vinst = function
| Call(_) | Local_init(_, ConsInit(_, _, Plain_func), _) ->
| Call(_, { enode = Lval((Var _), NoOffset)} , _, _)
| Local_init(_, ConsInit(_ , _, Plain_func), _) ->
let change = function
| [ Call(r, ({ enode = Lval((Var f), NoOffset) } as e), args, loc) ] ->
let f, args = self#replace_call (r, f, args) in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment