From eb5ccfb9abb572acc4dcd8059d700d8f19c04126 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 29 Apr 2024 12:00:12 -0700 Subject: [PATCH] [clang codegen] Fix MS ABI detection of user-provided constructors. (#90151) In the context of determining whether a class counts as an "aggregate", a constructor template counts as a user-provided constructor. Fixes #86384 (cherry picked from commit 3ab4ae9e58c09dfd8203547ba8916f3458a0a481) --- clang/docs/ReleaseNotes.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 691cbd25f57924..793a0442ed03e0 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -118,6 +118,12 @@ ABI Changes in This Version `-fms-compatibility-version=19.14` to imitate the MSVC 1914 mangling behavior. (GH#70899). +- Fixed Microsoft calling convention for returning certain classes with a + templated constructor. If a class has a templated constructor, it should + be returned indirectly even if it meets all the other requirements for + returning a class in a register. This affects some uses of std::pair. + (#GH86384). + AST Dumping Potentially Breaking Changes ----------------------------------------