[clang] [Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (PR #134930)

2025-04-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/134930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ccdd55c - [clang] Fix unused variable warning in MS mangler from constant matrix patch

2025-04-26 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-26T09:17:56-07:00 New Revision: ccdd55c518277d749eff878ffcb5ca3de55c2a60 URL: https://github.com/llvm/llvm-project/commit/ccdd55c518277d749eff878ffcb5ca3de55c2a60 DIFF: https://github.com/llvm/llvm-project/commit/ccdd55c518277d749eff878ffcb5ca3de55c2a60.diff

[clang] 743c32e - [clang] Disable libclang abort death test after merging unittests

2025-04-29 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-29T11:27:58-07:00 New Revision: 743c32eb8195c248c699c61ffbac141947b8e6ab URL: https://github.com/llvm/llvm-project/commit/743c32eb8195c248c699c61ffbac141947b8e6ab DIFF: https://github.com/llvm/llvm-project/commit/743c32eb8195c248c699c61ffbac141947b8e6ab.diff

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-29 Thread Reid Kleckner via cfe-commits
rnk wrote: I attempted to repro on my macbook, but it doesn't reproduce. This test doesn't seem high value, and I thin kthe right next step is to disable it to green the bots before debugging it. https://github.com/llvm/llvm-project/pull/134196 ___ c

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-05-01 Thread Reid Kleckner via cfe-commits
rnk wrote: Are the `CodeGenTest.TestNonAlterTest` failures still an issue? I don't see that failure on any bots. I haven't gotten any reports. https://github.com/llvm/llvm-project/pull/134196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-05-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/138360 This reverts commit 83ff9d4a34b1e579dd809759d13b70b8837f0cde. Don't change the builtin signature of _mm_prefetch this time. >From 7da648bdd03a2fce7ab214f0425efb3a1ec1f4fe Mon Sep 17 00:00:00 2001 Fr

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/138251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-02 Thread Reid Kleckner via cfe-commits
rnk wrote: > follow what we did for _m_prefetchw, but it seems the same idea was tried > there but that was also reverted for what seems to be the same exact problem. > See https://github.com/llvm/llvm-project/pull/115099 and revert > [here](https://github.com/llvm/llvm-project/commit/83ff9d4a

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-05-02 Thread Reid Kleckner via cfe-commits
@@ -138,6 +142,12 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in } } +// PRFCHW +let Features = "prfchw", Header = "x86intrin.h", Attributes = [NoThrow, Const] in { + def _m_prefetch : X86LibBuiltin<"void(void *)">; rn

[clang] [Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (PR #134930)

2025-04-21 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, looks good to me! I wanted to add llvm-cxxfilt to the test to confirm these all demnagle to something readable, but I see it doesn't work on Microsoft symbols today, which is unfortunate. The code I want is on github in @nico's https:

[clang] [clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms (PR #128222)

2025-04-21 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, I think this is a good direction. https://github.com/llvm/llvm-project/pull/128222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Reid Kleckner via cfe-commits
rnk wrote: If you take the two PRs together, we're going to implement the indirection logic at both the frontend and backend level. If we do it in the backend, I think it's technically necessary to do it in the frontend, but it is consistent with how we handle all other types. I'd like to see

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-06 Thread Reid Kleckner via cfe-commits
@@ -6519,6 +6519,13 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bit-field type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-fiel

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! I approved it. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/127653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. I think correctness comes first, so this prioritization makes sense. https://github.com/llvm/llvm-project/pull/127653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
@@ -855,6 +855,16 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // Create parameter copies. We do it before creating a promise, since an // evolution of coroutine TS may allow promise constructor to observe // parameter copies. +for (

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Reid Kleckner via cfe-commits
@@ -190,3 +210,38 @@ method some_class::good_coroutine_calls_custom_constructor(float) { // CHECK: invoke void @_ZNSt16coroutine_traitsIJ6methodR10some_classfEE12promise_typeC1ES2_f(ptr {{[^,]*}} %__promise, ptr noundef nonnull align 1 dereferenceable(1) %{{.+}}, float c

[clang] [clang] Use TargetInfo to decide Mangling for C (PR #129920)

2025-03-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, I spent a while thinking if this was correct, and then convincing myself that we ignore the relevant calling conventions on the appropriate platforms (we ignore `__fastcall` on x64 and ignore `__vectorcall` on Win ARM). https://github.

[clang] [clang] Remove isOSWindows() checks (PR #129909)

2025-03-05 Thread Reid Kleckner via cfe-commits
@@ -4769,31 +4769,32 @@ ExprResult Sema::CheckOSLogFormatStringArg(Expr *Arg) { /// Check that the user is calling the appropriate va_start builtin for the /// target and calling convention. static bool checkVAStartABI(Sema &S, unsigned BuiltinID, Expr *Fn) { - const llvm::Tri

[clang] Remove xbegin and _xend (PR #126952)

2025-02-12 Thread Reid Kleckner via cfe-commits
rnk wrote: This is an observable behavior change, so it should have a test. There's a test for this header at clang/test/Headers/ms-intrins.cpp that you can extend. You probably need to add a new RUN line that adds `-mrtm` or some other micro-architectural feature so that rtmintrin.h declares

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-14 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, I'm happy with this patch. https://github.com/llvm/llvm-project/pull/124834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove xbegin and _xend (PR #126952)

2025-02-19 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/126952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-20 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: In the issue (#127499) you pointed out that this issue applies to the MSVC ABI where all parameters are destroyed in the callee. Is it reasonable to construct the analogous test case in that environment? I tried to do this locally, but can't for unrelated buil

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Re: sroa/mem2reg, that's a valid concern with Hans's intrinsic approach. > So it's not really a question of "improving" the existing algorithm; we need > markers in the IR, like coro_outside_frame, and the algorithm should be based > on that. To check my understanding, by explicit

[clang] Generalize creduce-clang-crash.py script to look for cvise (PR #128592)

2025-02-24 Thread Reid Kleckner via cfe-commits
"vise" is not a verb, but the external facing text has been updated. >From 0c416d9af99af4c8983800faa4d253c545c3f0bb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 24 Feb 2025 22:50:12 + Subject: [PATCH] Generalize creduce-clang-crash.py script to look for cvise cvise r

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-20 Thread Reid Kleckner via cfe-commits
rnk wrote: Thanks for the updates, I think this is almost done. @zmodem , this will probably have some impact on Chrome code size and will probably churn many crash stack traces. I think it's safe to rely on all the existing automated testing, but this is a high-risk change to keep in mind if

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -2657,7 +2657,10 @@ class VFTableBuilder { MethodVFTableLocation Loc(MI.VBTableIndex, WhichVFPtr.getVBaseWithVPtr(), WhichVFPtr.NonVirtualOffset, MI.VFTableIndex); if (const CXXDestructorDecl *DD = dyn_cast(MD)) { -MethodVF

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -575,6 +576,12 @@ class CGCXXABI { QualType ElementType, llvm::Value *&NumElements, llvm::Value *&AllocPtr, CharUnits &CookieSize); + /// Reads the array cookie associated with the given pointer, + /// that sho

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -7919,3 +7919,38 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + CXXDestructorDecl *Dtor = RD->getDestruct

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
@@ -7919,3 +7919,38 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + CXXDestructorDecl *Dtor = RD->getDestruct

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: Hm, these comments didn't post. They may be stale. I will post them and revisit them. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-02-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I resolved two conversations, but there are two actionable comments. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Generalize creduce-clang-crash.py script to look for cvise (PR #128592)

2025-02-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/128592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-02 Thread Reid Kleckner via cfe-commits
rom fe6604dc283a454c212b8e2cd21d94df96fb05d4 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 2 Apr 2025 18:34:05 + Subject: [PATCH] Reapply "[cmake] Refactor clang unittest cmake" This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-04 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s rnk wrote: Thanks, I looked at the files, and

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-28 Thread Reid Kleckner via cfe-commits
consolidating unit tests into fewer binaries, but seems like a good refactoring in its own right. >From e662d8d9483fdf82030ddec6969bc89ae2404060 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 16:49:09 -0700 Subject: [PATCH] [cmake] Refactor clang unittest cmake Pass all

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/133545 >From e662d8d9483fdf82030ddec6969bc89ae2404060 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 16:49:09 -0700 Subject: [PATCH 1/2] [cmake] Refactor clang unittest cmake Pass all the dependenc

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-02 Thread Reid Kleckner via cfe-commits
it. >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH] [clang] Merge gtest binaries into AllClangUnitTests This reduces the size of the clang/unittests build directory by 64% and my overall build dir size by 5%. Stat

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

2025-04-03 Thread Reid Kleckner via cfe-commits
@@ -3897,6 +3897,13 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, return; } + // If there is no valid insert point, we won't emit a return. + // The insert point could be null if we have already emitted a return + // (e.g. if musttail) + if (

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-04 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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: Ap

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-04 Thread Reid Kleckner via cfe-commits
rnk wrote: We have internal reports of incorrect mangling substitutions after updating to 537b6541e8067d7ef7aa38791989fca6303b7fd from 799e9053641a6478d3144866a97737b37b87c260, and this change seems like the likely culprit because it's touching the Itanium mangling code. We'll see if that can

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-05-09 Thread Reid Kleckner via cfe-commits
@@ -138,6 +138,12 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in } } +// PRFCHW +let Features = "prfchw", Header = "intrin.h", Attributes = [NoThrow, Const] in { rnk wrote: Looks like I actually had a pending change to

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-05-09 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138360 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-05-09 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138360 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,

[clang] [clang] Deflake the TimeProfile support tests (PR #138613)

2025-05-08 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/138613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-05-12 Thread Reid Kleckner via cfe-commits
@@ -304,7 +304,7 @@ getCodeModel(const CodeGenOptions &CodeGenOpts) { .Case("kernel", llvm::CodeModel::Kernel) .Case("medium", llvm::CodeModel::Medium) .Case("large", llvm::CodeModel::Large) -

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2025-05-16 Thread Reid Kleckner via cfe-commits
rnk wrote: Sorry to hear about the issue. I think the way this is supposed to work is that the clang frontend target ABIInfo is supposed to carefully construct struct types that cause the backend to pass the C struct type correctly in registers and memory. See for example clang/lib/CodeGen/Tar

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-16 Thread Reid Kleckner via cfe-commits
@@ -1825,6 +1825,11 @@ class Sema final : public SemaBase { /// Set of no-builtin functions listed by \#pragma function. llvm::SmallSetVector MSFunctionNoBuiltins; + /// Map of BuiltinIDs to source locations that have #pragma intrinsic calls + /// that refer to them. +

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: Thanks! https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-14 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/139614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-14 Thread Reid Kleckner via cfe-commits
@@ -710,4 +710,17 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); #define LLVM_PREFERRED_TYPE(T) #endif +/// \macro LLVM_VIRTUAL_ANCHOR_FUNCTION +/// This macro is used to adhere to LLVM's policy that each class with a vtable +/// must have at least one out-of-lin

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-14 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I thought we'd have more anchors, honestly. Maybe these are just the overriding ones. https://github.com/llvm/llvm-project/pull/139614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-14 Thread Reid Kleckner via cfe-commits
rnk wrote: > Or we think no one else does this anchor business, and in that case... why > are we doing it? Anchoring debug information out of a header and into a .cpp file can be a powerful optimization. I added a key method to Sema in 586f65d31f32ca6bc8cfdb8a4f61bee5057bf6c8 and it resulted

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-20 Thread Reid Kleckner via cfe-commits
rnk wrote: > I think silencing the warning is better than suggesting a default case, which > may not be considered good practice. I'm not sure, I think our perspectives as compiler people might be a bit off base. We're always forming closed algebraic sum types, like variants, AST nodes, that

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-20 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/138562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-20 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I'm OK with this, but I feel like this is creating scope creep. Now we have a special Wdeprecated-declarations carveouts for switches, but if you unpack the switch into if / else chain comparisons, you get deprecation warnings. Should we disable deprecation wa

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-20 Thread Reid Kleckner via cfe-commits
@@ -6767,6 +6767,9 @@ class Sema final : public SemaBase { }; std::optional DelayedDefaultInitializationContext; +/// Whether evaluating an expression for a switch case label. rnk wrote: supernit: pack it with the contextual bools above, for both

[clang] [clang][Sema] Don't warn for implicit uses of builtins in system headers (PR #138205)

2025-05-19 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Nice, looks good, thanks for implementing this! https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

2025-05-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. This looks good, but I'd give it another day to give other reviewers an opportunity to comment. https://github.com/llvm/llvm-project/pull/139614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-22 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/138562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-21 Thread Reid Kleckner via cfe-commits
@@ -6009,6 +6009,8 @@ def note_not_found_by_two_phase_lookup : Note<"%0 should be declared prior to th def err_undeclared_use : Error<"use of undeclared %0">; def warn_deprecated : Warning<"%0 is deprecated">, InGroup; +def warn_deprecated_switch_case : Warning<"%0 is depr

[clang] [Modules] Don't fail when an unused textual header is missing. (PR #138227)

2025-05-23 Thread Reid Kleckner via cfe-commits
rnk wrote: (This is mostly written wearing my "Googler" hat, not the clang area team lead hat) There's been a lot of discussion of what the exact use case is. I think it's helpful to share the context that Google essentially uses Clang header modules to wrap generated proto headers, and this

[clang] [clang][Sema] Fix and reapply 'Declare builtins used in #pragma intrinsic #138205' (PR #142019)

2025-06-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Wow. Thanks for debugging it! I assumed this had more to do with intrin0.h than the namespaces in the libc++ string header. https://github.com/llvm/llvm-project/pull/142019 ___ cfe-commits mailing lis

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-19 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/144428 >From afb050103754e6b4656c68da8ddfb6b1a4e03e5d Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 16 Jun 2025 20:08:12 + Subject: [PATCH 1/5] [clang] Register all LLVM targets in AllClangUnitTest m

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-19 Thread Reid Kleckner via cfe-commits
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS) get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS) add_distinct_clang_unittest(AllClangUnitTests ${SRCS} + AllClangUnitTests.cpp rnk wrote: Yeah,

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-18 Thread Reid Kleckner via cfe-commits
rnk wrote: > The entries in the IP2State table contain byte offsets within the instruction > stream of the function. The Windows ABI requires that these offsets are > aligned to instruction boundaries; they are not permitted to point to a byte > that is not the first byte of an instruction. >

[clang] [llvm] [Reland] [PowerPC] frontend get target feature from backend with cpu name (PR #144594)

2025-06-18 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, go for it. This doesn't match the `-gen-x-target-def` pattern used for ARM, AArch64, and RISCV, but it's target-generic, which seems nice. https://github.com/llvm/llvm-project/pull/144594 ___

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-06-24 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/138360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang, debuginfo] added vtt parameter in destructor DISubroutineType (#130674)" (PR #145697)

2025-06-25 Thread Reid Kleckner via cfe-commits
00:00:00 2001 From: Reid Kleckner Date: Wed, 25 Jun 2025 06:31:07 -0600 Subject: [PATCH 1/2] Reapply "[Clang,debuginfo] added vtt parameter in destructor DISubroutineType (#130674)" This reverts commit cd826d6e840ed33ad88458c862da5f9fcc6e908c. --- clang/lib/CodeGen/CGDebugInfo.cp

[clang] Reapply "[Clang, debuginfo] added vtt parameter in destructor DISubroutineType (#130674)" (PR #145697)

2025-06-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/145697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang, debuginfo] added vtt parameter in destructor DISubroutineType (#130674)" (PR #145697)

2025-06-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/145697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. @erichkeane, thanks for looking into it, no worries if nobody gets back. I think we should go ahead and land this in the mean time. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mai

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-16 Thread Reid Kleckner via cfe-commits
rnk wrote: If we've had fixes available for years, I think backporting them would be the right call, but this seems like it might be a release-note-worthy change. https://github.com/llvm/llvm-project/pull/143034 ___ cfe-commits mailing list cfe-commit

[clang] [clang][ARM][AArch64] Reapply "Define intrinsics guarded by __has_builtin on all platforms (#128222)" (PR #140910)

2025-06-13 Thread Reid Kleckner via cfe-commits
rnk wrote: > To be clear you mean modify Clang's intrin.h to include arm_acle.h when on > supported targets Yep! https://github.com/llvm/llvm-project/pull/140910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-06-13 Thread Reid Kleckner via cfe-commits
rnk wrote: > Would it make sense to have a custom main for AllClangUnitTests and register > all targets, just like clang driver does? That sounds reasonable. I toyed with the idea of putting the registration into a static initializer, but it raises the question of where you put it. Putting it

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-13 Thread Reid Kleckner via cfe-commits
rnk wrote: Internally, we discovered that this patch breaks Boost as used by MySQL. I don't have a full external reproducer at the moment and I don't know whether the code is valid or not, but I wanted to give a heads up that we may need to revisit this. This seems like the kind of incompatibi

[clang] [clang] Add release note for int->enum conversion change. (PR #144407)

2025-06-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/144407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,24 @@ +//===- clang/unittests/AllClangUnitTests.cpp --===// +// +// 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: Apa

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/144428 >From afb050103754e6b4656c68da8ddfb6b1a4e03e5d Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 16 Jun 2025 20:08:12 + Subject: [PATCH 1/3] [clang] Register all LLVM targets in AllClangUnitTest m

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/144428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/144428 >From afb050103754e6b4656c68da8ddfb6b1a4e03e5d Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 16 Jun 2025 20:08:12 + Subject: [PATCH 1/4] [clang] Register all LLVM targets in AllClangUnitTest m

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,24 @@ +//===- clang/unittests/AllClangUnitTests.cpp --===// +// +// 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: Apa

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-17 Thread Reid Kleckner via cfe-commits
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS) get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS) add_distinct_clang_unittest(AllClangUnitTests ${SRCS} + AllClangUnitTests.cpp rnk wrote: I spo

[clang] [llvm] [Reland] [PowerPC] frontend get target feature from backend with cpu name (PR #144594)

2025-06-17 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,191 @@ +//===- EmitTargetFeature.cpp - Generate CPU Targer feature ===// +// +// 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-2.0 WITH

[clang] [llvm] [Reland] [PowerPC] frontend get target feature from backend with cpu name (PR #144594)

2025-06-17 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,191 @@ +//===- EmitTargetFeature.cpp - Generate CPU Targer feature ===// rnk wrote: typo https://github.com/llvm/llvm-project/pull/144594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-06-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138187 >From 7e23666e3366101d635648faf95aaf7245643b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 30 Apr 2025 16:32:32 -0700 Subject: [PATCH 1/4] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Wind

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-06-26 Thread Reid Kleckner via cfe-commits
@@ -20,7 +20,6 @@ target_link_libraries(CoreTests LLVMBOLTRewrite LLVMBOLTProfile LLVMBOLTUtils - LLVMTestingSupport ) rnk wrote: This removal here was interesting. Bolt doesn't support the LLVM dylib build, and it tries to disable linking the LLVM

[clang] Reapply "[clang][ARM][AArch64] Define intrinsics guarded by __has_builtin on all platforms" (#128222)" (PR #140910)

2025-06-03 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Yep, feel free to reland this. https://github.com/llvm/llvm-project/pull/140910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-11 Thread Reid Kleckner via cfe-commits
rnk wrote: Erich, is there a good point-of-contact at nvidia who can review CUDA intrinsic header changes in the future? https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-06-12 Thread Reid Kleckner via cfe-commits
@@ -8,6 +8,12 @@ if (HAS_WERROR_GLOBAL_CTORS AND NOT LLVM_HAS_NOGLOBAL_CTOR_MUTEX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=global-constructors") endif() +set(LLVM_TARGET_DEFINITIONS ${LLVM_MAIN_SRC_DIR}/lib/Target/PowerPC/PPC.td) + +tablegen(LLVM PPCGenSubtargetInfo

[clang] cbf27bf - Revert " [PowerPC] frontend get target feature from backend with cpu name (#137670)"

2025-06-12 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-06-12T19:56:41Z New Revision: cbf27bf711c08c34185f05ca5edbfa61bd3786e2 URL: https://github.com/llvm/llvm-project/commit/cbf27bf711c08c34185f05ca5edbfa61bd3786e2 DIFF: https://github.com/llvm/llvm-project/commit/cbf27bf711c08c34185f05ca5edbfa61bd3786e2.diff LOG

[clang] Reapply "[Clang, debuginfo] added vtt parameter in destructor DISubroutineType (#130674)" (PR #145697)

2025-06-25 Thread Reid Kleckner via cfe-commits
rnk wrote: cc @mgschossmann https://github.com/llvm/llvm-project/pull/145697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-06-30 Thread Reid Kleckner via cfe-commits
rnk wrote: > Do I understand correctly that, as a result of this commit, the SemaTests > target no longer exists, and to work on / run the tests that it used to > include (such as HeuristicResolverTest.cpp), I have to build the > ClangdUnitTests target, which requires building 1000+ test sourc

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-06-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138187 >From 7e23666e3366101d635648faf95aaf7245643b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 30 Apr 2025 16:32:32 -0700 Subject: [PATCH 1/5] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Wind

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-07-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I had some pending draft comments from back when this was active. My recollection is that this is actually quite difficult and I am not likely to have time in the near future to work on it. https://github.com/llvm/llvm-project/pull/122197

[clang] Allow packing fields into tail padding of record fields (PR #122197)

2025-07-16 Thread Reid Kleckner via cfe-commits
@@ -389,14 +389,28 @@ void CGRecordLowering::accumulateFields(bool isNonVirtualBaseType) { // Empty fields have no storage. ++Field; } else { - // Use base subobject layout for the potentially-overlapping field, - // as it is done in RecordLayoutBuild

<    11   12   13   14   15   16   17   18   19   20   >