Open gojakuch opened 2 months ago
this was partially solved in #1088. we now support namespace names in the nested name chain, but nothing else, so the reproducer still produces invalid code. an example of what now works can be found in the ValidCodeGen tests in clad.
Any clue how to support this?
well, I'd been trying to solve this issue fully in #1088 but as we saw to little avail, since the debug build kept crushing. I tried a bunch of different approaches and none worked for the debug build. but there should be a way. my guess is that we need to somehow use source locations properly (since these nested names seem to be built by using type locations and other locations), but there's a chance that I overlooked something because of working on it for too long.
Can you give me a small standalone reproducer to take a look?
the reproducer in the issue text is still relevant
There's a plenty of examples in Kokkos unittests, for instance. Using Clad with the
generate-source-file
option thus produces invalid code with some nested name qualifiers missing.Here's a reproducer:
In the generated code, the
TN::Test::multiplier
is just used asmultiplier
which isn't correct.