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

2023-12-18 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Is intrin0.h a header that ships with MSVC's compiler, or with MS's STL? If > the latter, shouldn't everything just work already? It ships with MSVC. `intrin0.h` from MSVC doesn't work currently due to some declarations not matching declarations in clang's own `intrin.h`. Fo

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

2023-12-18 Thread Max Winkler via cfe-commits
MaxEW707 wrote: MSVC STL requires the x64 adc intel intrinsics. I moved those to a separate file `adcintrin.h` that can be included from `immintrin.h` and `intrin0.h` for x64. I also made a table [here ](https://gist.github.com/MaxEW707/2f4bf26801bc1b6b088aa7a2fadba526) of all the intrinsics

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-19 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/75992 See https://github.com/llvm/llvm-project/pull/75711 for discussion. As a summary from the PR above, `` includes adc intrinsics and adx intrinsics. To support MSVC STL we need to expose the adc intrinsics inside

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

2023-12-19 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > @MaxEW707 If you pull out the adcintrin.h change into a separate PR we can > fast track it as it should be done anyhow Done :). Here is the link since I can't add reviewers https://github.com/llvm/llvm-project/pull/75992. https://github.com/llvm/llvm-project/pull/75711

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-19 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/75992 >From b6ea2ffe22f414ec79cd9ccd7e47c7b063583bcc Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:55:21 -0500 Subject: [PATCH 1/2] Move Intel ADC instri

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-19 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/75992 >From b6ea2ffe22f414ec79cd9ccd7e47c7b063583bcc Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:55:21 -0500 Subject: [PATCH 1/3] Move Intel ADC instri

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-19 Thread Max Winkler via cfe-commits
@@ -580,8 +580,7 @@ _storebe_i64(void * __P, long long __D) { #include #endif -/* Some intrinsics inside adxintrin.h are available only on processors with ADX, - * whereas others are also available at all times. */ MaxEW707 wrote: > add comment for adcintri

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

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

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

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

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

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

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

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

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-19 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/75992 >From b6ea2ffe22f414ec79cd9ccd7e47c7b063583bcc Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:55:21 -0500 Subject: [PATCH 1/4] Move Intel ADC instri

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-19 Thread Max Winkler via cfe-commits
@@ -580,8 +580,7 @@ _storebe_i64(void * __P, long long __D) { #include #endif -/* Some intrinsics inside adxintrin.h are available only on processors with ADX, - * whereas others are also available at all times. */ MaxEW707 wrote: Confirmed that Intel ADX i

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

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

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-20 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/75992 >From b6ea2ffe22f414ec79cd9ccd7e47c7b063583bcc Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:55:21 -0500 Subject: [PATCH 1/5] Move Intel ADC instri

[clang] [clang] Separate Intel ADC instrinsics from ADX intrinsics (PR #75992)

2023-12-20 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Thanks @MaxEW707 ! I don't have other comments now. Do you need help to merge > it for you? Thanks for the review :). I don't have commit access so we need someone to commit the PR for me. https://github.com/llvm/llvm-project/pull/75992 __

[clang] [clang][driver] Fix unused var warnings in if statements (PR #76346)

2023-12-24 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/76346 None >From e95623f3e0b89d2499ffe19a4d36eabef9ffa2d4 Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Sun, 24 Dec 2023 20:53:19 -0500 Subject: [PATCH] Fix unused var warn

[clang] [clang][driver] Fix unused var warnings in if statements (PR #76346)

2023-12-24 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Closing this out. Looks like someone beat me to it :). https://github.com/llvm/llvm-project/commit/81ae2a8bb01d38162e0269fc6819584af6d60b03 https://github.com/llvm/llvm-project/pull/76346 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang][driver] Fix unused var warnings in if statements (PR #76346)

2023-12-24 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/76346 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/76596 Background https://godbolt.org/z/hv53svTrq for reference on all of the below. In games debug performance is critical as much as optimized performance. We mainly accomplish this by reducing the amount

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

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/76596 ___ 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)

2023-12-29 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/76596 >From ff2c4b9310950c56a4e2a2b7752f3c3c442a6805 Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Fri, 29 Dec 2023 04:02:10 -0500 Subject: [PATCH 1/3] Add `clang::behaves_l

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

2023-12-30 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > (@MaxEW707 I think having a chat about this informally would be nice.) Sounds good. Let me know the best way to contact you. > While I disagree with the reasoning for not just using std I'll try to give more context here. The main reason is include times and not wanting to w

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

2023-12-30 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > I don't know whether all of these things should be handled with the same > attribute, or whether they should be handled at all, but they should > definitely be considered when designing this attribute. For this I am more concerned with language level features such as move, f

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

2023-12-30 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/76646 There are code bases that inline `std::move` manually via `static_cast`. Treat a static cast to an xvalue as an inlined `std::move` call and warn on a self move. >From a081f8266f24405523e6d283318bd898fd2d376a M

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

2023-12-31 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/2] Warn on self move for

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

2023-12-31 Thread Max Winkler via cfe-commits
MaxEW707 wrote: I appreciate the discussions. I know I have a tendency to get ranty in my writing so I just want to be clear that I mean no malice. I can further explain my side. > Include times > Modules should ease that pain I don't know how else to make it clear that we will never be includ

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

2024-01-08 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > I would like some measurements so we can compare build times on Windows. I took some benchmarks with `-ftime-trace` on the parse times with and without this change. Pretty much all the big hitters, string/vector/map/algorithm, includes `` which includes `` which includes ``.

[openmp] [flang] [mlir] [lldb] [clang-tools-extra] [llvm] [libcxx] [lld] [compiler-rt] [clang] [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: > Users (Chromium included) use recent versions of Clang that are not vendored > by Microsoft. Users can also use the LLVM OSS releases. I think most users > probably won't notice the compile time regression, and it will silently go > away the next time the update MSVC, but if

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

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

[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-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. https://learn.microsoft.com/en-us/cpp/build/reference/fd-progra

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

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

[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 https://lists.llvm.org/cgi-bi

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

[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 https://lists.llvm.or

[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 https://lists.llvm.org/cgi-bin

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >