Open HaydnTrigg opened 6 days ago
I think I’ve made some progress in diagnosing the issue. I finally bothered to set up a proper development environment and ran a debug build. This revealed errors in previously unreachable sections of the code within the MicrosoftMangler. (Seems sketchy that unreachable code doesn't explode in a release build but continues to produce... something? even if it's invalid output with zero warning that there might have been a problem)
I 'implemented' ReflectionKind::Declaration by copy-pasting from the ItaniumMangler and, well, hacking it until it compiled and hey presto this seems to have resolved the issue. I'm guessing that the mangled names were being encoded identically, so it just ended up always using the first symbol, I might double check that later.
Link to my branch with changes https://github.com/HaydnTrigg/clang-p2996/tree/microsoft-mangling
I assume that everything is just going to be placeholder for the moment with name mangling. I imagine it's going to be a very long time before there is a spec for mangling reflection types and I want to be able to test the reflection code on Windows.
Would it be welcomed if I implemented some placeholder logic for reflection in the MicrosoftMangler code for the time being and submitted a pull request for that?
Describe the bug Trying to expand the members of a struct that contains 'Cheese', 'Bacon', 'Burger'. Compiling for Linux results in expected output, for Windows however 'Cheese' is repeated 3 times.
Expected behavior in Godbolt https://godbolt.org/z/3fo8zGGbc
Observed behavior
Expected behavior
To Reproduce I am compiling this test program using clang-cl and overriding the system headers to include libcxx before MSVC.
The source code
Relevant command line
-std=c++26 -freflection -freflection-new-syntax -freflection-latest
Environment (please complete the following information):
Operating System and Version: Windows 11 23H2
Compiled Clang using the following
Additional context I have added some extra logging to
substitute
that spits out some output just before executingSetAndSucceed
and the output from the compile option and program is as follows.