-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanding results in repeated first argument on Windows #120
Comments
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 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? |
By default, when building clang in release mode, I've started to just copy the reflection name mangling from the ItaniumMangler, but didn't get very far. |
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):
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.The text was updated successfully, but these errors were encountered: