[PATCH] D49639: [MS Demangler] Demangle pointers to member functions
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 21 16:11:21 PDT 2018
zturner updated this revision to Diff 156694.
zturner added a comment.
I had forgotten to re-enable all of the member pointer tests. When I did re-enable them, a few were still broken, so I fixed them up. All member pointer tests now pass.
In doing so, we now differ from undname with regards to function return values. If you have this code:
typedef int (*fun)();
fun (B::* volatile memptrtofun7)();
This will be mangled as `?memptrtofun7@@3R8B@@EAAP6AHXZXZEQ1@`. undname will undecorate this as `int (__cdecl*(__cdecl B::* __ptr64 memptrtofun7)(void) __ptr64)(void)`. I find the multiple levels of nesting pretty difficult to read here, and I find it makes more sense when the return value is entirely on the left. So I've implemented that change here, and now we will print `int __cdecl (*)(void) __cdecl (B::*volatile memptrtofun7)(void)` which is much more similar to how the code actually looks.
Also, I was wrong in my original commit message. We're still not at 100% - clang extensions. This patch still has some failing tests regarding extern c functions and static locals. I'll consider those low priority though and work on getting major functionality working first.
https://reviews.llvm.org/D49639
Files:
llvm/lib/Demangle/MicrosoftDemangle.cpp
llvm/lib/Demangle/StringView.h
llvm/test/Demangle/ms-basic.test
llvm/test/Demangle/ms-mangle.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49639.156694.patch
Type: text/x-patch
Size: 15161 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180721/7cf2d5fc/attachment.bin>
More information about the llvm-commits
mailing list