[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-23 Thread Reid Kleckner via cfe-commits
@@ -2316,6 +2316,20 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { } VisitCXXMethodDecl(D); + + // Microsoft CXX ABI specific: + // Restore the RecordToCopyCtor sidecar LUT entry so that `throw` expressions + // find the correct copy constructo

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-23 Thread Reid Kleckner via cfe-commits
@@ -2316,6 +2316,20 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { } VisitCXXMethodDecl(D); + + // Microsoft CXX ABI specific: + // Restore the RecordToCopyCtor sidecar LUT entry so that `throw` expressions + // find the correct copy constructo

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-27 Thread Reid Kleckner via cfe-commits
rnk wrote: +1 to separating implementation from enablement. Enabling the warning by default will predictably generate pushback and folks may ask to revert, and it's a good best practice to be able to easily do that while leaving the implementation in place. https://github.com/llvm/llvm-projec

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

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

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [clang] UEFI handle unsupported triples. (PR #124824)

2025-01-28 Thread Reid Kleckner via cfe-commits
rnk wrote: +1 for a test https://github.com/llvm/llvm-project/pull/124824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] UEFI handle unsupported triples. (PR #124824)

2025-01-28 Thread Reid Kleckner via cfe-commits
@@ -637,6 +637,10 @@ static llvm::Triple computeTargetTriple(const Driver &D, } } + // Currently the only architecture supported by *-uefi triples are x86_64. + if(Target.isUEFI() && Target.getArch() != llvm::Triple::x86_64) rnk wrote: ```suggestion

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-07 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/122029 Move the common case of FieldDecl::getFieldIndex() inline to mitigate the cost of removing the extra `FieldNo` induction variable. Also rename isNoUniqueAddress parameter to isNonVirtualBaseType, which appears to b

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-09 Thread Reid Kleckner via cfe-commits
rnk wrote: Thanks for the review! > nitpick, I don't think this is an NFC change. It would require some thought > to really convince myself this did not have subtle behavior changes even if > unintended. I agree this change assumes some invariants about immutability of field ordering to be c

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

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

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-09 Thread Reid Kleckner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-09 Thread Reid Kleckner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-09 Thread Reid Kleckner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-09 Thread Reid Kleckner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-15 Thread Reid Kleckner via cfe-commits
rnk wrote: I added some reviewers to increase visibility. This warning is designed to avoid common pitfalls with shared objects and hidden visibility as I understand it, so I thought @maskray might be able to help with some ELF linker/loader insight as to whether this warning is valuable. htt

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

2025-02-12 Thread Reid Kleckner via cfe-commits
@@ -2964,20 +2963,36 @@ static bool isValidCodeModelAttr(Sema &S, StringRef Str) { static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { StringRef Str; SourceLocation LiteralLoc; + auto IsTripleSupported = [](const llvm::Triple Triple) { +return Tr

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

2025-02-12 Thread Reid Kleckner via cfe-commits
@@ -2950,12 +2950,11 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } -static bool isValidCodeModelAttr(Sema &S, StringRef Str) { - if (S.Context.getTargetInfo().getTriple().isLoongArch()) { +static bool isValidCodeModelAttr(llvm::Triple Tripl

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

2025-02-12 Thread Reid Kleckner via cfe-commits
@@ -2964,20 +2963,36 @@ static bool isValidCodeModelAttr(Sema &S, StringRef Str) { static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { StringRef Str; SourceLocation LiteralLoc; + auto IsTripleSupported = [](const llvm::Triple Triple) { +return Tr

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

2025-03-14 Thread Reid Kleckner via cfe-commits
rnk wrote: I think the `.SCOV$M` section globals should be in the `??_EClassA@@UEAAPEXI@Z` comdat group. I think sanitizer coverage (sancov) is one of the lesser-used sanitizers here, and it may lack some sophistication when it comes to comdat groups. I wasn't aware of this creative use of `bl

[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] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk converted_to_draft https://github.com/llvm/llvm-project/pull/134196 ___ 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-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/134195 ___ 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-04-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/2] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang] a1935fd - [clang] Remove unused SourceManager.cpp includes, NFC (trying out clangd)

2025-04-04 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-04T22:10:19-07:00 New Revision: a1935fd3809772c06f9a09fa151181642ae92b20 URL: https://github.com/llvm/llvm-project/commit/a1935fd3809772c06f9a09fa151181642ae92b20 DIFF: https://github.com/llvm/llvm-project/commit/a1935fd3809772c06f9a09fa151181642ae92b20.diff

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

2025-03-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: If split stacks are negatively impacting profiling, debugging, or other compiler development tasks, I have to ask, have we considered optimizing clang stack usage? There are multiple issues: * Clang is a recursive descent parser. This isn't going to change, it

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

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

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

2025-03-26 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 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] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-26 Thread Reid Kleckner via cfe-commits
rnk wrote: I'll try to take a look at this when I get a chance, but that looks like it's not happening today. I read the comments a bit and found some codesearch links worth sharing for reference. Here's the original UnicodeString array new operation: https://source.chromium.org/chromium/chrom

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

2025-03-26 Thread Reid Kleckner via cfe-commits
@@ -52,6 +56,7 @@ else() check_include_file(mach/mach.h HAVE_MACH_MACH_H) check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H) check_include_file(pthread.h HAVE_PTHREAD_H) + check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) rnk wrote: Do we nee

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

2025-03-26 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,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-03-27 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: Please add a test for the MSVC ABI,

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

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/3] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/4] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/5] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/6] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-09 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: The premerge tests failed on a modules crash recovery test case on other platforms, and those seem like true positives that need to be fixed. Overall, I think the main risk with this approach is that it will break in-process, FP-based stack unwinders that vali

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Reid Kleckner via cfe-commits
@@ -11045,15 +11045,18 @@ bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) { DiagnoseUseOfDecl(OperatorDelete, Loc); MarkFunctionReferenced(Loc, OperatorDelete); Destructor->setOperatorDelete(OperatorDelete, ThisArg); - // Lookup delete[] too in

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Reid Kleckner via cfe-commits
@@ -11045,15 +11045,18 @@ bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) { DiagnoseUseOfDecl(OperatorDelete, Loc); MarkFunctionReferenced(Loc, OperatorDelete); Destructor->setOperatorDelete(OperatorDelete, ThisArg); - // Lookup delete[] too in

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. I have some minor suggestions, but please go ahead and land this without additional review since it is a forward-fix. https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-

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

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/7] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/135041 ___ 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-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk ready_for_review https://github.com/llvm/llvm-project/pull/134196 ___ 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-04-10 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/8] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-03-30 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 dependencies

[clang] Add back include for AutoConvert.h as it's needed for z/OS (PR #135430)

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

[clang] Add back include for AutoConvert.h as it's needed for z/OS (PR #135430)

2025-04-13 Thread Reid Kleckner via cfe-commits
rnk wrote: I just happened to look into the implementation of AutoConvert.h, and I see the entire interface is defined away when not targeting zOS. This means that all call sites need to be conditional on `ifdef __MVS__`, which means we have ugly ifdef droppings all over the codebase, which ha

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

2025-04-15 Thread Reid Kleckner via cfe-commits
rnk wrote: We do a similar mangling for our extended vector types, so I would start by copying the clang/test/CodeGenCXX/mangle-ms-vector-types.cpp file to mangle-ms-matrix.cpp, and add a second RUN line that pipes the result to `llvm-cxxfilt` and uses a second FileCheck invocation to validate

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-15 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 %s -triple x86_64-windows -fsyntax-only -Wcast-function-type -Wno-cast-function-type-strict -verify=windows +// RUN: %clang_cc1 %s -triple x86_64-windows -fsyntax-only -Wcast-function-type -Wno-cast-function-type-strict -x c++ -verify=windows

[clang] Generate empty .clang-format-ignore before running tests (PR #136154)

2025-04-17 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/136154 ___ 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-04-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/8] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: Thanks! It looks like the new IR after this change doesn't pass verification, and presumably this causes the crash later: ``` $ cl

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

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: Hm, reverting this change doesn't fix the verifier error, the issue still repros for me with this change reverted. Are we sure this

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

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: The actual underlying issue appears to come from ae0d224 / #91310 , which added `CodeGenModule::EmitExternalFunctionDeclaration`,

[clang] 0e0a166 - Revert unintentional diff from cd826d6e840ed33ad88458c862da5f9fcc6e908c

2025-04-23 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-23T22:30:44Z New Revision: 0e0a1665fa340b9f1934d12aff818064aaf289ef URL: https://github.com/llvm/llvm-project/commit/0e0a1665fa340b9f1934d12aff818064aaf289ef DIFF: https://github.com/llvm/llvm-project/commit/0e0a1665fa340b9f1934d12aff818064aaf289ef.diff LOG:

[clang] [clang][ARM][AArch64] Don't require arm_acle header for universally defined intrinsics (PR #136742)

2025-04-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Sure, but winnt.h declares and uses tons of x86 intrinsics already, and we have a way to make this work. Let me go look at what we did for `_m_prefetchw` and see if we can apply that here. We want to do something similar to a default-error-warning, where system headers like winnt.h

[clang] [clang] Split out and disable tests that break relative rpaths (PR #137411)

2025-04-26 Thread Reid Kleckner via cfe-commits
rnk wrote: > I wonder if we can do this check statically instead. I'm not sure I follow, what do you mean by "statically" in this context? https://github.com/llvm/llvm-project/pull/137411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang] Split out and disable tests that break relative rpaths (PR #137411)

2025-04-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/137411 ___ 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-04-29 Thread Reid Kleckner via cfe-commits
rnk wrote: I disabled the failing test in 743c32eb8195c248c699c61ffbac141947b8e6ab. https://github.com/llvm/llvm-project/pull/134196 ___ 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-04-30 Thread Reid Kleckner via cfe-commits
rnk wrote: > `BasicTests` and `FormatTests` had fairly few deps (they didn't need Sema > etc) and compiled much fewer files than they presumably now do. Does it make > sense to keep those as distinct binaries? FormatTests has many clang dependencies, but after rebuilding, it looks like it's s

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-04-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Is this ready to go? I can't recall if we ultimately accepted the RFC. https://github.com/llvm/llvm-project/pull/118026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-04-14 Thread Reid Kleckner via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + rnk wrote: > If we have to define them on non-windows targets anyways, perhaps a better > fix is to let clang define them everywhere, and avoid this special case in > the headers. Yes, we

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

2025-04-14 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,180 @@ + +// RUN: %clang_cc1 -fsyntax-only -Wms-bitfield-compatibility -verify -triple armv8 -std=c++23 %s +// RUN: %clang_cc1 -fsyntax-only -DMS_BITFIELDS -mms-bitfields -verify=msbitfields -triple armv8-apple-macos10.15 -std=c++23 %s + +// msbitfields-no-diagnostics

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

2025-04-16 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/130674 _

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

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

[clang] [clang] Shard out some small gtest binaries (PR #138021)

2025-04-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/138021 ___ 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-02 Thread Reid Kleckner via cfe-commits
rnk wrote: > FWIW, I'm seeing the test failure on Windows x64 with a debug build of > Clang's unit tests as of a fresh fetch of main this morning. Sorry about that! I leaned on the Windows premerge tests to find Windows issues (they did, that was useful), but I'm pretty sure it uses release, n

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

2025-05-05 Thread Reid Kleckner via cfe-commits
rnk wrote: I hacked together a workaround here: https://github.com/llvm/llvm-project/pull/138613 I'm mostly just guessing remotely, since I don't have a reliable repro, that the final PerformPending... event is rounding into the previous event group that just ended. If the JSON encodes this n

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

2025-05-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/138613 These tests have been flaky since they were merged into the AllClangUnitTests binary, but the flakiness is inherent to the nature of timer-based tests. >From 935546b1d9f41b0dc1d6628bb641554186a0fb17 Mon Sep 17 00:00

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

2025-05-05 Thread Reid Kleckner via cfe-commits
@@ -15,7 +15,7 @@ enum SwitchTwo { }; void testSwitchTwo(enum SwitchTwo st) { - switch (st) {} // expected-warning{{enumeration values 'Vim' and 'Emacs' not handled in switch}} + switch (st) {} // expected-warning{{enumeration values 'Ed', 'Vim' and 'Emacs' not handled in

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

2025-05-05 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-05 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: Thanks! I think this is sufficiently niche that we don't need a flag flip to manage the diagnostic change fallout. https://github.com/llvm/llvm-project/pull/138562 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

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

2025-05-05 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: I attempted to reapply this patch, but the BPF test which I added fails with this test for reasons I don't understand. @mgschossman

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

2025-04-24 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: > the issue still repros for me with this change reverted. This was actually user error on my side, after messing around a bit I wa

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/137079 Use GetAddrOfGlobal, which is a more general API that takes a GlobalDecl, and handles declaring C++ destructors and other types in a general way. We can use this to generalize over functions and variable declaration

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

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: rnk wrote: We should be able to reland after #137079 lands https://github.com/llvm/llvm-project/pull/130674 __

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/137079 >From e78b8012376798746b5cf4d664e656e22591acdb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 23 Apr 2025 22:29:22 + Subject: [PATCH 1/3] [BPF] Fix issues with external declarations of C++ structor decl

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

2025-04-23 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,127 @@ +//===--- 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] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. If we ever generalize this, it would make sense to have a standalone .s /.asm file in the build. https://github.com/llvm/llvm-project/pull/136046 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

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

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

[clang] cd826d6 - Revert "[Clang,debuginfo] added vtt parameter in destructor DISubroutineType (#130674)"

2025-04-23 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-23T22:09:02Z New Revision: cd826d6e840ed33ad88458c862da5f9fcc6e908c URL: https://github.com/llvm/llvm-project/commit/cd826d6e840ed33ad88458c862da5f9fcc6e908c DIFF: https://github.com/llvm/llvm-project/commit/cd826d6e840ed33ad88458c862da5f9fcc6e908c.diff LOG:

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

2025-04-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Ping, WDYT? https://github.com/llvm/llvm-project/pull/134196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-24 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/137079 ___ 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-04-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/8] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-25 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] Split out and disable tests that break relative rpaths (PR #137411)

2025-04-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/137411 These two tests copy the clang binary into the test tree and assume it will run from a new location. This is incompatible with relative rpath values, which is what you typically get in a dylib developer build. Disable

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Reid Kleckner via cfe-commits
@@ -13,10 +15,41 @@ struct Bar { struct Baz { virtual ~Baz() {} - static void operator delete[](void* ptr) = delete; // expected-note {{explicitly marked deleted here}} + static void operator delete[](void* ptr) = delete; // expected-note {{explicitly marked deleted here

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

2025-04-14 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-14 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks, looks good. https://github.com/llvm/llvm-project/pull/133173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. I agree this is the practical thing to do. https://github.com/llvm/llvm-project/pull/135660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

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

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

2025-04-15 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: https://github.com/rnk approved this pull request. Thanks for the comment! https://github.com/llvm/llvm-project/pull/13067

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

2025-04-15 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: I haven't actually directly implemented one of these, but this approach looks like the others. Please add tests. Also, I see that we use llvm-cxxfilt to validate that the mangling comes back the way we expect. Please add some tests with that utility to check t

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

2025-04-29 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/134196 ___ 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-04-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/9] [clang] Merge gtest binaries into AllClangUnitTests This reduces

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

2025-04-28 Thread Reid Kleckner via cfe-commits
rnk wrote: If anyone is looking for stories about the value of premerge testing, I was all set to push this tonight, but I saw the linux premerge test failure. I debugged it, and it turns out to be a subtle interaction where if you run Clang codegen with registered targets but no registered Ta

[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

<    10   11   12   13   14   15   16   >