[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-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 , SourceLocation Loc, T1 = S.Context.getQualifiedType(UnqualT1, T1Quals); if (isa(T2) && T2Quals) T2 = S.Context.getQualifiedType(UnqualT2, T2Quals); + + if

[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-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-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

[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] [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] [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] [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

[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:

[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

[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] [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

[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 :).

[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

[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:

[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

[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-28 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 ---

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

2024-06-28 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-28 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,

[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
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
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -std=c++17 -fms-compatibility-version=19.20 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-windows-msvc | FileCheck --check-prefix=AFTER %s +// RUN: %clang_cc1 -std=c++17 -fms-compatibility-version=19.14

[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 created https://github.com/llvm/llvm-project/pull/97007 Fixes https://github.com/llvm/llvm-project/issues/70899. This is a continuation of https://github.com/llvm/llvm-project/pull/92477 for pointers to member data and pointers to member functions. The mangled

[clang] Adjust MSVC version range for ARM64 build performance regression (PR #90731)

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

[clang] Adjust MSVC version range for ARM64 build performance regression (PR #90731)

2024-06-23 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Rebased on latest main. Let's see what CI say. Looks like CI is happy. Do you need someone to commit the change on your behalf or do you have commit access? https://github.com/llvm/llvm-project/pull/90731 ___ cfe-commits mailing

[clang] Adjust MSVC version range for ARM64 build performance regression (PR #90731)

2024-06-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! Looks CI failed due to MSVC "fatal error C1060: compiler is out of heap space" inside a flang source file. I would try syncing upto main since I know flang has had quite of changes that overall reduce MSVC's memory usage at least

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

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

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-06-18 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Will llvm/lib/Demangle/MicrosoftDemangle.cpp also need to be updated? (That > could be done separately) Possibly. I didn't realize the llvm-project implemented demangling as well. I'll take a look at the demangle code after I merge this PR and get a separate PR up if it

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-06-17 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Friendly ping @rnk @efriedma-quic @zmodem https://github.com/llvm/llvm-project/pull/92477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

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

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

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

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

2024-05-23 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/91689 >From 3b0967e0a8f564d761ea10858854776ede396bdf Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 9 May 2024 21:21:22 -0400 Subject: [PATCH 1/2] [clang][Driver] Fix enabling strict alising by default when the

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-05-23 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! @xbjfk Let us know if you require one of us to commit on your behalf due to not having commit access. https://github.com/llvm/llvm-project/pull/68690 ___ cfe-commits mailing list

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

2024-05-23 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/91689 >From b43a6302009b9a11ef672f3bd01e10342102de44 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 9 May 2024 21:21:22 -0400 Subject: [PATCH 1/2] [clang][Driver] Fix enabling strict alising by default when the

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-05-23 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @huangqinjin Try rebasing you changes on top of latest main. Looks like Windows CI is passing there including flang commits which are the source files that are causing msvc to run out of heap space. https://github.com/llvm/llvm-project/pull/89772

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

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

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

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

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-05-21 Thread Max Winkler via cfe-commits
@@ -8065,6 +8069,9 @@ void Clang::AddClangCLArgs(const ArgList , types::ID InputType, CmdArgs.push_back("-fno-wchar"); } + if (!types::isCXX(InputType) && Args.hasArg(options::OPT_fms_define_stdc)) + CmdArgs.push_back("-fms-define-stdc"); MaxEW707

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

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

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-05-21 Thread Max Winkler via cfe-commits
@@ -2934,6 +2934,10 @@ def fms_compatibility : Flag<["-"], "fms-compatibility">, Group, Visibility<[ClangOption, CC1Option, CLOption]>, HelpText<"Enable full Microsoft Visual C++ compatibility">, MarshallingInfoFlag>; +def fms_define_stdc : Flag<["-"],

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-05-21 Thread Max Winkler via cfe-commits
@@ -291,6 +291,7 @@ LANGOPT(HIPStdParInterposeAlloc, 1, 0, "Replace allocations / deallocations with LANGOPT(OpenACC , 1, 0, "OpenACC Enabled") +LANGOPT(MSVCEnableStdcMacro , 1, 0, "Define __STDC__ with '-fms-compatability'") MaxEW707 wrote:

[clang] [clang][driver] Support `-x` for all languages in CL mode (PR #89772)

2024-05-21 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @huangqinjin The error is "fatal error C1060: compiler is out of heap space" which is unrelated. I haven't figured out how to resend the event to trigger a build retry without pushing an empty commit. I usually just do `git commit -m "rebuild" --allow-empty` and then push that

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

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

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-05-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/92477 >From 139c51074b43623ea7b206080056823e216fedac Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 16 May 2024 21:03:46 -0400 Subject: [PATCH 1/2] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling ---

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-05-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/92477 >From 7b73c2b907b09ec87197e9613c4abc27ff52083b Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Thu, 16 May 2024 21:03:46 -0400 Subject: [PATCH 1/2] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling ---

[clang] [clang-cl][AST] Fix auto NTTP MSVC 1920+ mangling for pointer types (PR #92477)

2024-05-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/92477 https://godbolt.org/z/G1K8Wszn9 for reference. Starting with MSVC 1920+, VS2019, C++17 auto NTTP now adds `M ` to the mangled name to avoid name collisions with different deduced types. This PR fixes pointers.

[clang] [clang][Driver] Fix enabling strict alising by default when the environment is MSVC (PR #91689)

2024-05-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/91689 I noticed this when changing some of my local projects to use my preferred driver mode, GCC, instead of the CL driver mode. >From looking at the rest of code and from my own understanding the driver mode >is

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

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

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-04 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/90547 >From f404db44d3770cdb8ac5123c16c0b04314eda698 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 29 Apr 2024 22:09:52 -0400 Subject: [PATCH 1/6] [clang][CodeGen] Fix MS ABI for classes with non static data

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/90547 >From f404db44d3770cdb8ac5123c16c0b04314eda698 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 29 Apr 2024 22:09:52 -0400 Subject: [PATCH 1/5] [clang][CodeGen] Fix MS ABI for classes with non static data

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

2024-05-03 Thread Max Winkler via cfe-commits
@@ -1131,13 +1132,18 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, return false; if (RD->hasNonTrivialCopyAssignment()) return false; + if (RD->needsImplicitCopyAssignment() && !RD->hasSimpleCopyAssignment()) MaxEW707 wrote:

[clang] [clang][CodeGen] Fix MSVC ABI for classes with a deleted copy assignment operator (PR #90547)

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

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-05-02 Thread Max Winkler via cfe-commits
@@ -1131,13 +1132,18 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, return false; if (RD->hasNonTrivialCopyAssignment()) return false; + if (RD->needsImplicitCopyAssignment() && !RD->hasSimpleCopyAssignment()) MaxEW707 wrote:

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-05-02 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/90547 >From f404db44d3770cdb8ac5123c16c0b04314eda698 Mon Sep 17 00:00:00 2001 From: MaxEW707 Date: Mon, 29 Apr 2024 22:09:52 -0400 Subject: [PATCH 1/4] [clang][CodeGen] Fix MS ABI for classes with non static data

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-04-30 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Maybe we should just be testing if the copy-assignment operator is deleted? > For reference, MSVC also returns the following indirectly: > > ``` > struct Test > { > int x; > Test& operator=(const Test&) = delete; > }; > Test foo(); > Test test(Test x) > { > return

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-04-29 Thread Max Winkler via cfe-commits
@@ -1144,11 +1167,13 @@ bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo ) const { if (!RD) return false; - bool isTrivialForABI = RD->canPassInRegisters() && - isTrivialForMSVC(RD, FI.getReturnType(), CGM); - // MSVC always returns

[clang] [clang][CodeGen] Fix MSVC ABI for classes with non static data members of reference type (PR #90547)

2024-04-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/90547 https://godbolt.org/z/verKj4cnj for reference. https://godbolt.org/z/z3W9v7o4n for reference. For global functions and static methods the MSVC ABI returns structs/classes with a reference type non static data

[clang] [clang-cl] [Driver] Fix clang-cl driver supported colon options (PR #88216)

2024-04-16 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Thank you for polishing this corner of the driver interface! It's interesting > that they have an alternative separate spelling. I always felt like the > /Fopath.cpp pattern was a bit unreadable. Thanks for the review. I will need you to commit on my behalf. I think its

[clang] [SEH] Ignore async exception flag when the environment is not MSVC (PR #88101)

2024-04-15 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/88101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Driver] Fix clang-cl driver supported colon options (PR #88216)

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

[clang] [clang-cl] [Driver] Fix clang-cl driver supported colon options (PR #88216)

2024-04-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/88216 Tested locally against msvc 1939. MSVC supports the colon form of various options that take a path even though that isn't documented for all options on MSDN. I added the colon form for all supported msvc

[clang] [ARM64EC] Add support for parsing __vectorcall (PR #87725)

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

[clang] [ARM64EC] Add support for parsing __vectorcall (PR #87725)

2024-04-07 Thread Max Winkler via cfe-commits
MaxEW707 wrote: LGTM. >From memory, its been a while since I've had to ship on ARM64EC, all instances >of `__vectorcall` are supposed to be rejected by msvc. That also aligns with >the `__vectorcall` docs on MSDN. I am not sure what clang's policy is with potentially allowing code that

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

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

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

2024-04-04 Thread Max Winkler via cfe-commits
MaxEW707 wrote: I didn't realize ARM64EC was supported by clang. You are missing one `#if defined(__x86_64__) && !defined(__arm64ec__)` check here, https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/intrin0.h#L47. Doesn't appear to be anyway to comment on lines that aren't in

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

2024-04-04 Thread Max Winkler via cfe-commits
@@ -413,6 +413,7 @@ static __inline__ void __DEFAULT_FN_ATTRS __writecr3(unsigned __INTPTR_TYPE__ __cr3_val) { __asm__ ("mov {%0, %%cr3|cr3, %0}" : : "r"(__cr3_val) : "memory"); } +#endif MaxEW707 wrote: Nice catch. We should probably also ifdef these

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-04-01 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/84651 >From 28cbaad3c16e985306c7b977cb7d9e8e89c39a07 Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:40:52 -0500 Subject: [PATCH 1/2] Fix

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-04-01 Thread Max Winkler via cfe-commits
@@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -emit-llvm -o - | FileCheck %s MaxEW707 wrote: Fair point since they are both Itanium ABI. I'll remove the

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-03-31 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @rnk for review. LGTM! >From experience with msvc the docs are very much outdated. For example almost >all path options accept the `:` form. For example `/Fd:` is valid even though the msdn docs do not state that.

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

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

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-03-31 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @AaronBallman @efriedma-quic Pinging you two for a review. Looking through the history of `CGClass.cpp` you guys appear to be the common reviewers and the CodeOwners file didn't have any information for who owns `CodeGen`. Feel free to add anyone who may be a better fit.

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

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

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-03-09 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/84651 Hit this when trying upgrade an old project of mine. I couldn't find a corresponding existing issue for this when spelunking the open issues here on github. Thankfully I can work-around it today with the

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-03-07 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Friendly reminder that I require someone to commit on my behalf since I do not have write access :). https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

2024-03-06 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Thanks all for the review :). I will need one of you to commit on my behalf since I do not have write access. https://github.com/llvm/llvm-project/pull/76646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

2024-03-05 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/76646 >From a081f8266f24405523e6d283318bd898fd2d376a Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Sat, 30 Dec 2023 22:00:38 -0500 Subject: [PATCH 1/4] Warn on self move

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-03-03 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Just want to say thanks for everyone taking the time to review the PR and providing feedback :). Looking forward to using this in the next release of clang-cl. > I'm a bit worried that we don't have any test coverage for this file to begin > with, so it's a bit hard to

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

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

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-02-24 Thread Max Winkler via cfe-commits
@@ -0,0 +1,26 @@ +/* === vadefs.h ---=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier:

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-02-24 Thread Max Winkler via cfe-commits
MaxEW707 wrote: I will need someone to commit on my behalf since I do not have write access. > lgtm, and good to land provided you do a quick re-check to confirm that this > doesn't tank compile times now with that part included. Thanks! The include times below are done with the following

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-02-13 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Ping Wondering if there is anything else required of me to progress this PR forward. Let me know :). https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

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

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2024-01-15 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > It's not ready, but I have a draft for a much more general attribute: #78071 I was playing around with your draft PR and I do prefer your solution over mine. It will even help to cleanup my custom `xmmintrin.h` header that we have to reduce include times from SSE headers.

[clang-tools-extra] [lldb] [llvm] [openmp] [clang] [compiler-rt] [libcxx] [lld] [flang] [mlir] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-01-10 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > #include > >clang-cl 16 frontend took ~190ms to parse those 3 headers. intrin.h took ~32ms >to parse. > >clang-cl built with this PR frontend took ~1368ms to parse. intrin.h took >~969ms to parse. Most of that time is from as expected. >intrin0.h took ~2ms to parse. Did

  1   2   >