Cesium
Cesium copied to clipboard
A "value" of a function should be its pointer
Right now, this doesn't seem to compile:
int foo(int) { return 0; }
typedef int foo_t(int);
foo_t v = foo;
This should work the same as foo_t v = &foo;
, i.e. it should take a function address automatically.
Look for the number 227
in the code to find clues to implement this feature.
can use please tell me , where foo_t v = foo is declared
Could you please clarify the question? What exactly are you looking for?
Currently, this exact definition (foo_t v = foo
) doesn't work.
I'd suggest starting looking from this place: https://github.com/ForNeVeR/Cesium/blob/720b4cbb3f218d535f059d8ca7df28f3392b4057/Cesium.CodeGen/Ir/Expressions/Values/FunctionValue.cs#L21-L24