[all-commits] [llvm/llvm-project] d940cd: [MSVC][Demangling] Respect MSDF_NoCallingConventio...
Fred Tingaud via All-commits
all-commits at lists.llvm.org
Tue Sep 15 05:39:09 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d940cd62a7851220d60d50c6e140b52e3462b242
https://github.com/llvm/llvm-project/commit/d940cd62a7851220d60d50c6e140b52e3462b242
Author: Fred Tingaud <95592999+frederic-tingaud-sonarsource at users.noreply.github.com>
Date: 2026-09-15 (Tue, 15 Sep 2026)
Changed paths:
M llvm/include/llvm/Demangle/Demangle.h
M llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
M llvm/lib/Demangle/MicrosoftDemangleNodes.cpp
M llvm/unittests/Demangle/MicrosoftDemangleTest.cpp
Log Message:
-----------
[MSVC][Demangling] Respect MSDF_NoCallingConvention for function pointers (#209113)
The goal is to update MSVC demangling so that we control whether we
display a function pointer as `void (__cdecl *funcPtr)(void)` or `void
(*funcPtr)(void)`, by abiding by the `MSDF_NoCallingConvention` flag.
It is not a one-liner because function pointers used to use a trick
where it would unconditionally drop all the flags and pass
`OF_NoCallingConvention` to output the calling convention inside the
parentheses. In order to respect `MSDF_NoCallingConvention`, we need to
get rid of this trick.
A side effect of the trick was that OF_NoReturnType was also lost, which
is actually good because dropping the return type of a named function is
unambiguous, but dropping the return type of a function pointer loses
important information. The fix enforces that behavior explicitly.
This change can have impact for end-users who always passed
MSDF_NoCallingConvention, but I believe that this new behavior is the
one they were expecting.
Assisted-by: Claude
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list