[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2025-01-08 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @shafik @AaronBallman @zmodem I believe I addressed all the feedback. Let me know if I missed anything. Feel free to ping anyone else I may have missed above :). https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailin

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2025-01-07 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/27] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2025-01-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/26] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/25] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/24] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-15 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/23] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-15 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/22] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-12 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/21] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-11 Thread Max Winkler via cfe-commits
@@ -0,0 +1,87 @@ +// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -fms-extensions -fms-compatibility -fms-reference-binding -Wno-microsoft-reference-binding -o - | FileCheck %s + +struct A {}; +struct B : A {}; + +void fAPickConstRef(A&) {} +void fAPickConstRef(cons

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/20] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/15] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From 0a705b1a8e9673cd5e803ffe392dacfa0f06c40f Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/14] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-08 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From c66fee7969fc4bd8b5ce79085f0fc09cbc4147da Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/13] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-12-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/117845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-02 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-02 Thread Max Winkler via cfe-commits
@@ -7272,6 +7272,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fdelayed-template-parsing"); } + if (Args.hasFlag(options::OPT_fms_reference_binding, + options::OPT_fno_ms_reference_binding, +

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-12-02 Thread Max Winkler via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++20 -fms-compatibility -fms-compatibility-version=19.33 -emit-llvm %s -o - -triple=x86_64-windows-msvc | FileCheck %s + +template +concept C = requires +{ +{ T::test([](){}) }; +}; + +template +struct Widget {}; + +template +stru

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-11-28 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/117845 >From 58a26201c8582fc573aa681867d57c236e799acb Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Tue, 26 Nov 2024 19:45:10 -0800 Subject: [PATCH 1/2] Fix MS Mangle concept uneval context template instantiation cra

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-11-22 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > I'd like to see this change make it into the repo, as I'm in a similar > situation with a 6+ million line codebase. What's the next steps to advance > this? Hey sorry. I've been busy with other work prios and an msvc mangling bug. I still intend to get back to this as I also

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! Would like a final look over from @MaskRay before merging :). https://github.com/llvm/llvm-project/pull/113966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Windows should use `-fuse-ld=lld` as well, not `-fuse-ld=lld-link` Is `-fuse-ld=lld-link` intended to be an allowable option? Right now we don't issue any error if a user passes in `lld-link`. I am interpreting your statement as suggesting we should do something like followi

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/113966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
@@ -0,0 +1,15 @@ +// REQUIRES: aarch64-registered-target +// +// RUN: echo "int main() {} " > %t.c +// +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -c %t.c -o %t.o +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -### %t.o 2>&1 |

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
@@ -0,0 +1,15 @@ +// REQUIRES: aarch64-registered-target +// +// RUN: echo "int main() {} " > %t.c +// +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -c %t.c -o %t.o +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -### %t.o 2>&1 |

[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

2024-10-14 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/112066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

2024-10-14 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @efriedma-quic What is the process for getting a fix into a milestone such as the upcoming 19.1.2 milestone. I read the docs on `cherry-pick` but I couldn't find any information about who decides what is considered suitable for a patch release. I am going to defer to you if you

[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

2024-10-13 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/112066 >From 52e2175eb672fa9a97f9c1480a3cfb727b7c3dce Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 11 Oct 2024 19:01:59 -0700 Subject: [PATCH 1/2] Fix extra tokens inside intrin0.h preprocessor directive --- c

[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

2024-10-13 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Not sure how you're actually hitting the error you reported; the clang header > directory should count as a system header, so the warning should normally be > suppressed, I think. It is counted as a system header and I could not repro the warning in my local tests. I was goi

[clang] [ARM64EC] Fix compilation of intrin.h in ARM64EC mode. (PR #87717)

2024-10-13 Thread Max Winkler via cfe-commits
@@ -44,7 +44,7 @@ unsigned char _InterlockedCompareExchange128_rel(__int64 volatile *_Destination, __int64 *_ComparandResult); #endif -#ifdef __x86_64__ +#ifdef __x86_64__ && !defined(__arm64ec__) MaxEW707 wrot

[clang] [ARM64EC] Fix compilation of intrin.h in ARM64EC mode. (PR #87717)

2024-10-11 Thread Max Winkler via cfe-commits
MaxEW707 wrote: I put a PR with a fix, https://github.com/llvm/llvm-project/pull/112066. This should probably go into 19.1.2 but I am familiar with that process. If someone with more experience in the project can give guidance there that would be appreciated :). https://github.com/llvm/llvm-p

[clang] [Headers] [ARM64EC] Fix extra tokens inside intrin0.h preprocessor directive (PR #112066)

2024-10-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/112066 Fixes https://github.com/llvm/llvm-project/pull/87717. >From 52e2175eb672fa9a97f9c1480a3cfb727b7c3dce Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 11 Oct 2024 19:01:59 -0700 Subject: [PATCH] Fix extra to

[clang] [clang] [Driver] Ensure we error on lto with link.exe and target `*-windows-msvc` on non cl driver modes (PR #109607)

2024-10-02 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/109607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [Driver] Ensure we error on lto with link.exe and target `*-windows-msvc` on non cl driver modes (PR #109607)

2024-09-22 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/109607 Similar to previous PRs I've done to change some `IsCLMode` checks to `isWindowsMSVCEnvironment`. I stumbled into this one accidentally last week. I did some greps and I think this is the last one for now. All

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/107509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-08 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > I don't have a very strong opinion. I find it surprising in that the clang > driver is supposed to be gcc-compatible, and having to use `clang > -fstrict-aliasing` (but only when targeting Windows) to get the default > behavior looks a bit surprising. > > (I agree it's a bet

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-09-05 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @rnk @zmodem Sorry for the ping. Its been a bit since this got reviewed and I recently hit this ABI case when moving some parts of a larger project to clang. https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-05 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/107509 Similar reasoning as this PR: https://github.com/llvm/llvm-project/pull/107177 `-fms-volatile` should be set by default for x86 targets as long as the triple is `*-windows-msvc`. The driver mode shouldn't dict

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-04 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] Support `-jmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/107177 Allow `-jmc` to be used if the target triple is targeting msvc, `*-windows-msvc`, irrelevant of the driver mode used. In general the driver mode shouldn't control the target triple. Also in our custom build s

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-26 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` > running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/66/builds/3102 > Here is the relevant pie

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/105999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [AST] Reapply #102848 Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #104722)

2024-08-25 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @zmodem I have a fix for https://ci.chromium.org/ui/p/chromium/builders/ci/ToTWin. This was an accidental regression on my part, sorry. The fix is here https://github.com/llvm/llvm-project/pull/105999. https://github.com/llvm/llvm-project/pull/104722 __

[clang] [clang-cl] [AST] Fix MS 1920+ placeholder return type mangling for lambdas (PR #105999)

2024-08-25 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/105999 Fixes https://github.com/llvm/llvm-project/pull/104722. Missed handling `decltype(auto)` trailing return types for lambdas. This was a mistake and regression on my part with my PR, https://github.com/llvm/llvm

[clang] [clang-cl] [AST] Reapply #102848 Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #104722)

2024-08-24 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/104722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [AST] Reapply #102848 Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #104722)

2024-08-18 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/104722 Reapply https://github.com/llvm/llvm-project/pull/102848. The description in this PR will detail the changes from the reverted original PR above. For `auto&&` return types that can partake in reference collap

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (PR #102851)

2024-08-15 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/102851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-14 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/102848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (PR #102851)

2024-08-14 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/102851 >From e6b925894066656a2773278a093dbf709ba66319 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Sun, 11 Aug 2024 22:37:55 -0700 Subject: [PATCH 1/4] Error on reference inside a union with msvc 1910+ --- clang/li

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (PR #102851)

2024-08-14 Thread Max Winkler via cfe-commits
@@ -619,6 +616,20 @@ template struct A {}; template struct B : A> { A::C::D d; }; // expected-warning {{implicit 'typename' is a C++20 extension}} } +#elif TEST4 + +union u { +int *i1; +int &i2; // expected-warning {{union member 'i2' has reference type 'int &', whi

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (PR #102851)

2024-08-13 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/102851 >From e6b925894066656a2773278a093dbf709ba66319 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Sun, 11 Aug 2024 22:37:55 -0700 Subject: [PATCH 1/3] Error on reference inside a union with msvc 1910+ --- clang/li

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-13 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/102848 >From e5071bd3be7607730654e5aa815a535db130fdee Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Sun, 11 Aug 2024 16:50:58 -0700 Subject: [PATCH 1/5] Fix placeholder return type name mangling for MSVC 1920+ --- c

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1900+ (PR #102851)

2024-08-12 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/102851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-12 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/102851 >From e6b925894066656a2773278a093dbf709ba66319 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Sun, 11 Aug 2024 22:37:55 -0700 Subject: [PATCH 1/2] Error on reference inside a union with msvc 1910+ --- clang/li

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-12 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/102848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-12 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/102848 >From e5071bd3be7607730654e5aa815a535db130fdee Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Sun, 11 Aug 2024 16:50:58 -0700 Subject: [PATCH 1/4] Fix placeholder return type name mangling for MSVC 1920+ --- c

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-12 Thread Max Winkler via cfe-commits
@@ -408,6 +408,9 @@ class MicrosoftCXXNameMangler { void mangleSourceName(StringRef Name); void mangleNestedName(GlobalDecl GD); + void mangleAutoReturnType(QualType T, SourceRange Range, MaxEW707 wrote: Argh you are correct. This is holdover from develo

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-12 Thread Max Winkler via cfe-commits
@@ -2494,6 +2506,58 @@ void MicrosoftCXXNameMangler::mangleAddressSpaceType(QualType T, mangleArtificialTagType(TagTypeKind::Struct, ASMangling, {"__clang"}); } +void MicrosoftCXXNameMangler::mangleAutoReturnType(QualType T, +

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-12 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > > I definitely remember this being an extension in older versions of VS > > around VS 2012 but don't know when MSVC no longer exactly removed support > > for this extension wholesale. > > This was definitely required for MFC headers; I remember implementing this > horrible n

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/102851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/102851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/102851 Godbolt for reference: https://godbolt.org/z/ovKjvWc46 I definitely remember this being an extension in older versions of VS around VS 2012 but don't know when MSVC no longer exactly removed support for this

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/102848 Partial fix for https://github.com/llvm/llvm-project/issues/92204. This PR just fixes VS2019+ since that is the suite of compilers that I require link compatibility with at the moment. I still intend to fix VS2

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-01 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-01 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From c66fee7969fc4bd8b5ce79085f0fc09cbc4147da Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/12] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-31 Thread Max Winkler via cfe-commits
@@ -4446,6 +4446,24 @@ CompareStandardConversionSequences(Sema &S, SourceLocation Loc, T1 = S.Context.getQualifiedType(UnqualT1, T1Quals); if (isa(T2) && T2Quals) T2 = S.Context.getQualifiedType(UnqualT2, T2Quals); + + if (S.getLangOpts().MSVCReferen

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From c66fee7969fc4bd8b5ce79085f0fc09cbc4147da Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/11] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From c66fee7969fc4bd8b5ce79085f0fc09cbc4147da Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 01/10] Support MSVC lvalue to temporary reference binding --- clang/

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-29 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > The scenario I am thinking about is when the user passed -fms-extensions and > no other individual flags. I think that mode should enable all of the > Microsoft extensions. Then users can opt out of whatever extensions they > don't want to enable. But I think it's confusing i

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From e0528ecc441e33822426b8b3d6522d056c95bb54 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 1/7] Support MSVC lvalue to temporary reference binding --- clang/do

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From e0528ecc441e33822426b8b3d6522d056c95bb54 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 1/6] Support MSVC lvalue to temporary reference binding --- clang/do

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99833 >From e0528ecc441e33822426b8b3d6522d056c95bb54 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Fri, 21 Jun 2024 20:37:40 -0700 Subject: [PATCH 1/5] Support MSVC lvalue to temporary reference binding --- clang/do

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-26 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > This should be controllable via -fms-extensions/-fno-ms-extensions; having > its own dialect flag is a bit novel but I'm not strongly opposed. CC @MaskRay > @jansvoboda11 for driver/options opinions For this feedback I intentionally didn't do this because this ms extension i

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-24 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/99833 MSDN docs for reference: https://learn.microsoft.com/en-us/cpp/build/reference/zc-referencebinding-enforce-reference-binding-rules?view=msvc-170 The warning referenced in that MSDN article: https://learn.micros

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-19 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/99426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-19 Thread Max Winkler via cfe-commits
@@ -154,3 +154,133 @@ a hint suggesting how to fix the problem. As of this writing, Clang is able to compile a simple ATL hello world application. There are still issues parsing WRL headers for modern Windows 8 MaxEW707 wrote: Ya its on my todo list to clean t

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-17 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/99426 >From 37f6bb1a6bc061357f1971c59c101ef7e6b53141 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 11 Jul 2024 23:07:35 -0700 Subject: [PATCH 1/4] Update MSVC compatibility docs --- clang/docs/MSVCCompatibility

[clang] [Clang] [docs] [MSVC] Add sections on `__forceinline` and intrinsic behaviour differences between Clang and MSVC (PR #99426)

2024-07-17 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/99426 We have had quite a few issues created around how Clang treats intrinsics vs how MSVC treats intrinsics. While I was writing this I also added some sections on behaviour changes that caught me while porting my

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-15 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @Endilll Wondering if this PR gets the green check from you. I would like to get this merged before the clang-19 branch is created and just want to get the green light from a more senior member of the community before merging. Thanks :). https://github.com/llvm/llvm-project/pu

[clang] Fix erroneous `-Wmissing-prototypes` for Win32 entry points (PR #98105)

2024-07-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/98105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix erroneous `-Wmissing-prototypes` for Win32 entry points (PR #98105)

2024-07-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/98105 >From f9def27dcbfe6ce1a55fd5c41d15d55b05d9a056 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 8 Jul 2024 19:14:11 -0700 Subject: [PATCH 1/5] Fix erroneous `-Wmissing-prototypes` for Win32 entry points ---

[clang] Fix erroneous `-Wmissing-prototypes` for Win32 entry points (PR #98105)

2024-07-08 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/98105 >From f9def27dcbfe6ce1a55fd5c41d15d55b05d9a056 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 8 Jul 2024 19:14:11 -0700 Subject: [PATCH 1/4] Fix erroneous `-Wmissing-prototypes` for Win32 entry points ---

[clang] Fix erroneous `-Wmissing-prototypes` for Win32 entry points (PR #98105)

2024-07-08 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/98105 >From f9def27dcbfe6ce1a55fd5c41d15d55b05d9a056 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 8 Jul 2024 19:14:11 -0700 Subject: [PATCH 1/3] Fix erroneous `-Wmissing-prototypes` for Win32 entry points ---

[clang] Fix erroneous `-Wmissing-prototypes` for Win32 entry points (PR #98105)

2024-07-08 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/98105 Fixes https://github.com/llvm/llvm-project/issues/94366. >From f9def27dcbfe6ce1a55fd5c41d15d55b05d9a056 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 8 Jul 2024 19:14:11 -0700 Subject: [PATCH 1/2] Fix erro

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-07 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-07 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM. @MitalAshok I noticed in your commit messages you mentioned reworking -fcomplete-member-pointers. Will that include fixing clang incorrectly warning when an inheritance model is explicitly specified. Godbolt for reference: https://

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-05 Thread Max Winkler via cfe-commits
@@ -598,7 +599,9 @@ class CXXRecordDecl : public RecordDecl { return !hasDefinition() || !isDynamicClass() || hasAnyDependentBases(); } - void setIsParsingBaseSpecifiers() { data().IsParsingBaseSpecifiers = true; } + void setIsParsingBaseSpecifiers(bool to = true) { --

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-05 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @memory-thrasher Godbolt for reference: https://godbolt.org/z/b9v8KhPET I don't follow that MSVC 1920+ does not support this mangling properly. It appears that it does. I haven't dug too deep into the C++20 MSVC mangling for NTTP yet but it does appear MSVC does support this p

[clang] [llvm] Fix MSVC 1920+ auto NTTP mangling for pointers to members (PR #97007)

2024-07-04 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/97007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix MSVC 1920+ auto NTTP mangling for pointers to members (PR #97007)

2024-06-27 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/97007 >From 762eb6deea8082902c7d278014fb9485f89a2ccf Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Wed, 26 Jun 2024 16:59:17 -0700 Subject: [PATCH 1/5] Fix MSVC 1920+ auto NTTP mangling for pointers to members --- c

[clang] [llvm] Fix MSVC 1920+ auto NTTP mangling for pointers to members (PR #97007)

2024-06-27 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/97007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix MSVC 1920+ auto NTTP mangling for pointers to members (PR #97007)

2024-06-27 Thread Max Winkler via cfe-commits
@@ -1767,12 +1805,12 @@ void MicrosoftCXXNameMangler::mangleTemplateArg(const TemplateDecl *TD, const CXXRecordDecl *RD = MPT->getMostRecentCXXRecordDecl(); if (MPT->isMemberFunctionPointerType() && !isa(TD)) { -mangleMemberFunctionPointer(RD, nul

[clang] [llvm] Fix MSVC 1920+ auto NTTP mangling for pointers to members (PR #97007)

2024-06-27 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/97007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >