clad
clad copied to clipboard
Complain if signatures of the forward declaration and generated code mismatch
Clad builds a gradient with a specific signature. It also allows that gradient function signature to be forward-declared. However if both mismatch there are subtle crashes in CodeGen. We should detect such cases and issue an error if they are in the same translation unit:
For example,
https://github.com/vgvassilev/clad/blob/d7e5434cd4aecc9e8a3e61e1660f1543ae5f3954/test/Gradient/Gradients.C#L269
returns void
, but the forward declaration is:
https://github.com/vgvassilev/clad/blob/d7e5434cd4aecc9e8a3e61e1660f1543ae5f3954/test/Gradient/Gradients.C#L283
which leads to subtle issues.
Hi @vgvassilev , Can I contribute to this issue?
@kaushal-malpure, please select one issue and solve it, please do not write under every open issue.