diff options
author | Max Winkler <max.enrico.winkler@gmail.com> | 2024-06-20 19:49:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 19:49:17 -0700 |
commit | 7b906d46f6e6915f32718dd5b313ba47a7cec259 (patch) | |
tree | 64a916f2834472ee99555c1a1fc72f8a35411df8 /clang/docs | |
parent | e1c03ddc9b03b820b421d8b3bca6a94e4d1a4675 (diff) | |
download | llvm-7b906d46f6e6915f32718dd5b313ba47a7cec259.zip llvm-7b906d46f6e6915f32718dd5b313ba47a7cec259.tar.gz llvm-7b906d46f6e6915f32718dd5b313ba47a7cec259.tar.bz2 |
[clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (#92477)
https://godbolt.org/z/G1K8Wszn9 for reference.
Starting with MSVC 1920+, VS2019, C++17 auto NTTP now adds `M <type>` to
the mangled name to avoid name collisions with different deduced types.
This PR fixes pointers. Pointers to members will be fixed in an upcoming
PR.
Here is a small example. The godbolt has more thorough examples.
```
template<auto>
struct AutoParmTemplate
{
AutoParmTemplate() {}
};
int i;
int main()
{
// MSVC 1916: ??0?$AutoParmTemplate@$1?i@@3HA@@QEAA@XZ
// MSVC 1929: ??0?$AutoParmTemplate@$MPEAH1?i@@3HA@@QEAA@XZ
// Clang: ??0?$AutoParmTemplate@$1?i@@3HA@@QEAA@XZ
AutoParmTemplate<&i> x;
}
```
Diffstat (limited to 'clang/docs')
-rw-r--r-- | clang/docs/ReleaseNotes.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 0973db2..88969a0 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -95,6 +95,13 @@ ABI Changes in This Version - Fixed Microsoft calling convention when returning classes that have a deleted copy assignment operator. Such a class should be returned indirectly. +- Fixed Microsoft name mangling for auto non-type template arguments of pointer + type for MSVC 1920+. This change resolves incompatibilities with code compiled + by MSVC 1920+ but will introduce incompatibilities with code compiled by + earlier versions of Clang unless such code is built with the compiler option + `-fms-compatibility-version=19.14` to imitate the MSVC 1914 mangling behavior. + + AST Dumping Potentially Breaking Changes ---------------------------------------- |