-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Fix MSVC Demangling with auto NTTP mangled names for function pointer, pointer to data and integral types #96590
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
Fix MSVC Demangling with auto NTTP mangled names for function pointer, pointer to data and integral types #96590
Conversation
…s and pointers to variables
llvm::itanium_demangle::starts_with(MangledName, "$H") || | ||
llvm::itanium_demangle::starts_with(MangledName, "$I") || | ||
llvm::itanium_demangle::starts_with(MangledName, "$J")) { | ||
} else if (startsWithOrWithoutPrefix(MangledName, "$1", IsAutoNTTP, 1) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not super happy with this fix but it was the cleanest way I could come up with to support $M
within the current infrastructure with minimal code changes.
Once I fix the rest of the name mangling issues in clang I need to come back here and most likely refactor how we demangle the template parameter list with a now larger holistic view of the different mangling schemes MSVC has.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -53,6 +53,18 @@ static bool consumeFront(std::string_view &S, std::string_view C) { | |||
return true; | |||
} | |||
|
|||
static bool consumeFront(std::string_view &S, std::string_view CA, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'm guessing the C
in these parameter names is really for "character", based on the initial overload on line 42. Maybe we could find better names for the string_views (how about Prefix?)
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/108/builds/501 Here is the relevant piece of the build log for the reference:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/649 Here is the relevant piece of the build log for the reference:
|
…, pointer to data and integral types (llvm#96590) As cited here, llvm#92477, undname needs updating to support the new auto NTTP name mangling. In short the deduced type of the auto NTTP parameter is mangled as `$M <type> <nttp-param>`. However the deduced type is not printed for the undecorated name so the `$M <type>` is parsed but simply ignored when stringifying the generated AST.
…, pointer to data and integral types (llvm#96590) As cited here, llvm#92477, undname needs updating to support the new auto NTTP name mangling. In short the deduced type of the auto NTTP parameter is mangled as `$M <type> <nttp-param>`. However the deduced type is not printed for the undecorated name so the `$M <type>` is parsed but simply ignored when stringifying the generated AST.
As cited here, #92477, undname needs updating to support the new auto NTTP name mangling.
In short the deduced type of the auto NTTP parameter is mangled as
$M <type> <nttp-param>
. However the deduced type is not printed for the undecorated name so the$M <type>
is parsed but simply ignored when stringifying the generated AST.