[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Sharadh Rajaraman via cfe-commits
sharadhr wrote: This is going badly off-topic. Supporting `--sysroot` with plain Clang is alright and good. Supporting libc++ is also good. But both need to automatically find a **normally-installed** MSVC SDK without a GNU-like refactor, and yes, that includes things like `Program Files(x86)

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Reid Kleckner via cfe-commits
rnk wrote: Sorry for not responding, I've had multiple trips this year where I've basically had to ignore all incoming mail after the fact. I think folks should probably stand back and really try to think about what their goals are. I understand the desire to have something resembling a sysroo

[clang] [clang-format] Fix bugs in annotating arrows and square brackets (PR #160973)

2025-09-26 Thread via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/160973 Fixes #160518 >From ec8aadf1ec05897667e1c9df60ac9845d45f955a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 26 Sep 2025 19:42:46 -0700 Subject: [PATCH] [clang-format] Fix bugs in annotating arrows and square

[clang] [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (PR #160970)

2025-09-26 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/160970 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6101248 - [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (#160970)

2025-09-26 Thread via cfe-commits
Author: Alexander Kornienko Date: 2025-09-27T08:38:46+02:00 New Revision: 61012483df44c181f4200a5b6f260d27f2052df1 URL: https://github.com/llvm/llvm-project/commit/61012483df44c181f4200a5b6f260d27f2052df1 DIFF: https://github.com/llvm/llvm-project/commit/61012483df44c181f4200a5b6f260d27f2052df1

[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Allow leakRef in copy methods (PR #160986)

2025-09-26 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/160986 Allow leakRef() in the return statement of an Objective-C copy method and other methods which return +1. >From db6956aa1a6c440b1be453dbe1a19e1e9ff576cf Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 26 S

[clang] [llvm] [Clang][CMake] Add CSSPGO support to LLVM_BUILD_INSTRUMENTED (PR #79942)

2025-09-26 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/79942 >From d1130449e000773e875ca4df7f1a1dc488070e14 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Wed, 19 Jul 2023 20:30:29 -0700 Subject: [PATCH] [Clang][CMake] Add CSSPGO support to LLVM_BUILD_INSTRUMENTED Build

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/159997 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread via cfe-commits
github-actions[bot] wrote: @moinakb001 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bui

[clang-tools-extra] 779adf1 - [clang-tools-extra] Fix python syntax - pull in Queue from module queue (#159997)

2025-09-26 Thread via cfe-commits
Author: Moinak Bhattacharyya Date: 2025-09-27T10:00:25+04:00 New Revision: 779adf16c941d489399d67c8befe418ad93528e4 URL: https://github.com/llvm/llvm-project/commit/779adf16c941d489399d67c8befe418ad93528e4 DIFF: https://github.com/llvm/llvm-project/commit/779adf16c941d489399d67c8befe418ad93528e

[clang] [clang][byte] Add callback mechanism to handle constexpr for unary integer ops (PR #160280)

2025-09-26 Thread Timm Baeder via cfe-commits
@@ -2551,6 +2525,23 @@ static bool interp__builtin_is_within_lifetime(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_elementwise_int_unaryop( +InterpState &S, CodePtr OpPC, const CallExpr *Call, +llvm::function_ref Fn) { + assert(Call->ge

[clang] 538cd20 - [clang][bytecode][NFC] Simplify a few builtin implementations (#160910)

2025-09-26 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-27T07:47:02+02:00 New Revision: 538cd20cfa2fbc115986ce84b8baf780cb876b96 URL: https://github.com/llvm/llvm-project/commit/538cd20cfa2fbc115986ce84b8baf780cb876b96 DIFF: https://github.com/llvm/llvm-project/commit/538cd20cfa2fbc115986ce84b8baf780cb876b96.diff L

[clang] [clang][bytecode][NFC] Simplify a few builtin implementations (PR #160910)

2025-09-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/160910 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > @trcrsired Can you try https://crates.io/crates/xwin? (and use it with > `--use-winsysroot-style`) This achieves the same effect as what you're doing > here it seems. In practical terms, one can then do `clang-cl /winsysroot ...` > as usual from Linux. Chromium does cross-co

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread Moinak Bhattacharyya via cfe-commits
moinakb001 wrote: @Endilll, would you mind checking this in? Thanks for the prompt review! https://github.com/llvm/llvm-project/pull/159997 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > You can't deny the existence of economics. Large companies like Google have > indeed contributed the most to LLVM, which determines their dominance. > > > That does not mean small developers like me should be bullied either which is exactly what antitrust law is supposed to

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread Bruno De Fraine via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -2198,8 +2211,16 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) { } llvm::Type *ResTy = ConvertType(Ty); - if (Ty->hasBooleanRepresentation() || Ty->isBitIntType() || - Ty->i

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > > > You can't deny the existence of economics. Large companies like Google > > > have indeed contributed the most to LLVM, which determines their > > > dominance. > > > > > > > > > > That does not mean small developers like me should be bullied either which > > is exactly

[clang] [llvm] Enable fexec-charset option (PR #138895)

2025-09-26 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 %s -emit-llvm -triple s390x-none-zos -fexec-charset IBM-1047 -o - | FileCheck %s +// RUN: %clang %s -emit-llvm -S -target s390x-ibm-zos -o - | FileCheck %s hubert-reinterpretcast wrote: There should be tests for other convert

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
Andarwinux wrote: > I am not trying to argue what the license LLVM should choose. I am just > trying to describe the consequence of what we get right now which is why you > cannot do things like mount ntfs for example. Yes. I added -Xmicrosoft-windows-sys-root, thinking it would be sufficient,

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Sharadh Rajaraman via cfe-commits
sharadhr wrote: @trcrsired I appreciate the response, but I'm not really willing to enter an ideological debate. I want to use what's practical, scalable, and supported. You mentioned using Android to develop; this is very interesting, and there are still solutions. Have you considered gettin

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/159997 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > > I am not trying to argue what the license LLVM should choose. I am just > > trying to describe the consequence of what we get right now which is why > > you cannot do things like mount ntfs for example. > > Yes. I added -Xmicrosoft-windows-sys-root, thinking it would be su

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > Just because Android and Windows are rivals doesn't mean Chromium is the > same. Enterprises aren't monolithic. > > Relying solely on the community is a dead end. Just look at GCC and MinGW. > they've fallen on hard times precisely because of the lack of support form > comp

[clang] [AST] Give `CharUnits::operator%` a consistent type. NFC (PR #160781)

2025-09-26 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/160781 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] fix(security): Address CodeQL Uncontrolled Data in Path Expression vulnerability (PR #160531)

2025-09-26 Thread MUSTAPHA BARKI via cfe-commits
https://github.com/aka76bm updated https://github.com/llvm/llvm-project/pull/160531 >From e28b543df69358dddef60dca110353227bced70f Mon Sep 17 00:00:00 2001 From: MUSTAPHA BARKI Date: Tue, 23 Sep 2025 02:52:03 +0100 Subject: [PATCH 01/10] [clang][AST] Add comment clarifying GNU inline visibilit

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
YexuanXiao wrote: > So I think for this PR to be recognized, it has to get major corporations > like Google interested in it. You should not expect commercial companies to support their opponents' platforms. The community is more motivated than commercial companies to support this feature.

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > > So I think for this PR to be recognized, it has to get major corporations > > like Google interested in it. > > You should not expect commercial companies to support their opponents' > platforms. The community is more motivated than commercial companies to > support this

[clang] [X86][Clang] Allow SSE/AVX COMI/UCOMI/CMPS/CMPP fp comparison intrinsics to be used in constexpr (PR #160876)

2025-09-26 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/160876 >From 40cca74bc3ed9398b9d94bfe79103c74841eddd3 Mon Sep 17 00:00:00 2001 From: mtx Date: Thu, 25 Sep 2025 22:43:12 +0800 Subject: [PATCH 1/2] [X86][Clang] Support `__builtin_ia32_(u)comi(sd)` --- clang/include/cl

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > In fact, a major factor in the success of LLVM was precisely the abandonment > of the GPL and the adoption of a more liberal license. Today the main > contributors to LLVM are from corporations. So I think for this PR to be > recognized, it has to get major corporations like

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
Andarwinux wrote: In fact, a major factor in the success of LLVM was precisely the abandonment of the GPL and the adoption of a more liberal license. Today the main contributors to LLVM are from corporations. So I think for this PR to be recognized, it has to get major corporations like Google

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-09-26 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: @nikic Is there a timeline for how long we want to leave the deprecated wrappers in before removing them? Maybe remove after llvm 22 branches? https://github.com/llvm/llvm-project/pull/130940 ___ cfe-commits mailing list cfe-comm

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
trcrsired wrote: > @trcrsired I appreciate the response, but I'm not really willing to enter an > ideological debate. I want to use what's practical, scalable, and supported. > > You mentioned using Android to develop; this is very interesting, and there > are still solutions. Have you conside

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread John McCall via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/160790 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-26 Thread Erich Keane via cfe-commits
erichkeane wrote: > I think we're more or less on the same page. I'm all for making docs useful, > and view "docs are spotty as-is" to be an argument for doing a better job. > > > Clang CUDA implementation is far enough from compatible with the NVIDIA > > CUDA that the CUDA programing manual >

[clang] [clang-tools-extra] [lldb] [clang] NFCI: Clean up `CompilerInstance::create{File,Source}Manager()` (PR #160748)

2025-09-26 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > There is an additional reference to this function in polly > > https://github.com/llvm/llvm-project/blob/d48bda5421c5af9baa5bc98ba4e3a453937ff96a/polly/lib/External/isl/interface/extract_interface.cc#L550 I'm not sure what to do with these TBH. That file seems to be trying

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread Erich Keane via cfe-commits
erichkeane wrote: I don't know Python/nor what is going on here. You'll have to vastly improve the commit message for any of us to get it, and we probably need to find someone with history in these files to review. https://github.com/llvm/llvm-project/pull/159997 _

[clang] Revert "[clang][DebugInfo][NFC] Simplify CollectRecordLambdaFields" (PR #160932)

2025-09-26 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/160932 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (PR #160970)

2025-09-26 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/160970 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread John McCall via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: https://github.com/rjmccall approved this pull request. LGTM. I don't think my approval constitutes approval from the Area Team either, though. https://github.com/llvm/llvm-project/pull/160790 ___

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread Julia Hansbrough via cfe-commits
https://github.com/flowerhack updated https://github.com/llvm/llvm-project/pull/157213 >From 322be1b06cc90837556b2b10cc3928f41f7b6f81 Mon Sep 17 00:00:00 2001 From: Julia Hansbrough Date: Fri, 5 Sep 2025 21:27:14 + Subject: [PATCH] Add bugprone-loop-variable-copied-then-modified clang-tidy

[clang] [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (PR #160970)

2025-09-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/160970 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread via cfe-commits
@@ -0,0 +1,36 @@ +//===--===// +// +// 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: Apac

[clang] [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (PR #160970)

2025-09-26 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh updated https://github.com/llvm/llvm-project/pull/160970 >From ea310a6bb8dc229180370321235697df27569595 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Sat, 27 Sep 2025 01:57:15 + Subject: [PATCH 1/2] [clang] Fix a use-after free in ASTContext::getSubstBu

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread Moinak Bhattacharyya via cfe-commits
moinakb001 wrote: Ping @cor3ntin @erichkeane @Endilll @cyndyishida https://github.com/llvm/llvm-project/pull/159997 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-26 Thread Moinak Bhattacharyya via cfe-commits
https://github.com/moinakb001 updated https://github.com/llvm/llvm-project/pull/159997 >From fc8616ea5831d017e649b8c470cc49b301337e9a Mon Sep 17 00:00:00 2001 From: Moinak Bhattacharyya Date: Sun, 21 Sep 2025 13:42:02 -0500 Subject: [PATCH] [clang-tools-extra] Fix python syntax - pull in Queue

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
YexuanXiao wrote: > In fact, `clang-cl` is exactly equal to `clang --driver-mode=cl`. For downstream users, such as Visual Studio or CMake, they are different things. > 1. libc++ when targeting `windows-msvc`. This is solved by directly using the > flag, but then removing the C standard librar

[clang] [clang-tools-extra] [clang-tidy] Fix false positives about references in `misc-const-correctness` (PR #160971)

2025-09-26 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/160971 >From fea611f78b31afb861228e0566b02b515bda1d67 Mon Sep 17 00:00:00 2001 From: flovent Date: Sat, 27 Sep 2025 10:13:09 +0800 Subject: [PATCH 1/2] [clang-tidy] Fix false positives about references in `misc-const-

[clang] [clang-tools-extra] [clang-tidy] Fix false positives about references in `misc-const-correctness` (PR #160971)

2025-09-26 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/160971 It's not legal to cast const pointer type to it's non-const reference type implicitly, and will cause compile error. And for explicit cast, it's legal but the pointer is mutable through this reference. >From

[clang] [clang][analyzer] Use the VFS to check model files (PR #160950)

2025-09-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/160950 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Sharadh Rajaraman via cfe-commits
sharadhr wrote: > Using --driver-mode=cl is actually a hybrid mode `clang`, `clang++`, and `clang-cl` are bit-for-bit exactly the same binaries for a given LLVM distribution (try comparing their hashes). The Clang driver changes its internal behaviour depending on the binary name itself. In

[clang] [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (PR #160970)

2025-09-26 Thread Matheus Izvekov via cfe-commits
@@ -5873,8 +5873,14 @@ ASTContext::getSubstBuiltinTemplatePack(const TemplateArgument &ArgPack) { QualType Canon; TemplateArgument CanonArgPack = getCanonicalTemplateArgument(ArgPack); - if (!CanonArgPack.structurallyEquals(ArgPack)) + if (!CanonArgPack.structurallyEqua

[clang] [clang] Fix a use-after free in ASTContext::getSubstBuiltinTemplatePack (PR #160970)

2025-09-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexander Kornienko (alexfh) Changes ASTContext::getSubstBuiltinTemplatePack finds InsertPos and then calls itself recursively, which may lead to rehashing and invalidation of all pointers to buckets. The function then proceeds with using t

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread Julia Hansbrough via cfe-commits
flowerhack wrote: (Stepping out for a couple hours, but I'll be adding the tests very shortly after that & will add another comment here when this is ready for another round of review. Thanks!) https://github.com/llvm/llvm-project/pull/157213 ___ cf

[clang] [clang] Use the VFS to get the unique file ID (PR #160936)

2025-09-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/160936 This PR uses the VFS to get the unique file ID when printing externalized decls in CUDA instead of going straight to the real file system. This matches the behavior of other input files of the compiler. >

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
YexuanXiao wrote: ```shell > clang++ -nostdinc --driver-mode=cl /winsdkdir= --driver-mode=gnu > -stdlib=libc++ -gcodeview ... > ``` > > A similar solution was posted > [here](https://github.com/llvm/llvm-project/issues/53004#issuecomment-1207167610). > These solutions are more difficult to

[clang] [clang] Use the VFS to get the unique file ID (PR #160936)

2025-09-26 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/160936 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][DebugInfo][NFC] Simplify CollectRecordLambdaFields" (PR #160932)

2025-09-26 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek auto_merge_enabled https://github.com/llvm/llvm-project/pull/160932 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add support for additional C++ declaration specifiers in QualifierOrder (PR #160853)

2025-09-26 Thread Björn Schäpers via cfe-commits
@@ -1384,6 +1397,65 @@ TEST_F(QualifierFixerTest, TemplatesLeft) { "TemplateType t;", Style); } +TEST_F(QualifierFixerTest, NewQualifierSupport) { + FormatStyle Style = getLLVMStyle(); + Style.QualifierAlignment = FormatStyle::QAS_Custom; + + // Test typede

[clang] [llvm] [clang] Use the VFS in `ModuleDependencyCollector` (PR #160944)

2025-09-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes This PR starts using the correct VFS in `ModuleDependencyCollector` instead of using the real FS directly. This matches compiler's behavior for other input files. ---

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Sharadh Rajaraman via cfe-commits
sharadhr wrote: > This patch adds support for the Clang-style command-line interface... allows > debugging with Visual Studio ```shell clang++ --driver-mode=cl /winsdkdir= --driver-mode=gnu -stdlib=libc++ -gcodeview ... ``` Is there something I'm missing here? Perhaps the libc++ work is usef

[clang] Fix Lambda Mangling in Namespace-Scope Variable Initializers. (PR #159115)

2025-09-26 Thread Richard Smith via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -fsycl-is-device -O0 -triple spirv64-unknown-unknown \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=DEVICE + +// RUN: %clang_cc1 -fsycl-is-host -O0 -triple spirv64-unknown-unknown \ +// RUN: -emit-llvm %s -o - | FileCheck %s --ch

[clang] Support HLSL matrix initializers (PR #160960)

2025-09-26 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/160960 >From 3fbcceb82ab0cdb3829241748c775407d15a2890 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 26 Sep 2025 14:48:22 -0400 Subject: [PATCH] Support HLSL matrix initializers fixes #159434 In HLSL matrices

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
YexuanXiao wrote: @rnk @sharadhr I want to clarify that this patch does not replace clang-cl. As an MSVC user myself, I know that many projects only support MSVC-style command-line flags, which is why clang-cl remains the best option for compatibility with MSVC. This patch adds support for the

[clang] [-Wunsafe-buffer-usage] Add unique_ptr accesses (PR #156773)

2025-09-26 Thread Jan Korous via cfe-commits
@@ -0,0 +1,62 @@ +// RUN: %clang_cc1 -Wno-unused-value -Wunsafe-buffer-usage -fsafe-buffer-usage-suggestions -std=c++20 -verify=expected %s + +// This debugging facility is only available in debug builds. jkorous-apple wrote: What does this comment mean and why

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
YexuanXiao wrote: > Lets split out the addition of the new flags for the unwind library, compiler > runtime library, and C++ runtime. We can handle those additions separately. > Adding them specifically with support for the MSVC layout and the MSVC flags > gets us to a point where there is sup

[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-09-26 Thread Nick Sarnie via cfe-commits
@@ -82,7 +82,8 @@ LLVM_ABI StructType *getEntryTy(Module &M); /// \param Data Extra data storage associated with the entry. /// \param SectionName The section this entry will be placed at. /// \param AuxAddr An extra pointer if needed. sarnex wrote: can we exp

[clang-tools-extra] [clang-tidy] Add IgnoredRegex to 'bugprone-suspicious-include' (PR #160958)

2025-09-26 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks created https://github.com/llvm/llvm-project/pull/160958 The use case is shown in the test: Qt's moc output not to trigger a warning. From 47fcb11c78f88f4318253c2a78daccbb413d6df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date:

[clang] [CIR] Upstream RTTI Builder & RTTI for VTable Definitions (PR #160002)

2025-09-26 Thread Andy Kaylor via cfe-commits
=?utf-8?q?“Amr?= , =?utf-8?q?“Amr?= , =?utf-8?q?“Amr?= Message-ID: In-Reply-To: @@ -424,6 +455,1034 @@ void CIRGenItaniumCXXABI::emitVirtualInheritanceTables( vtables.emitVTTDefinition(vtt, cgm.getVTableLinkage(rd), rd); } +namespace { +class CIRGenItaniumRTTIBuilder { +

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `modernize-deprecated-headers` (PR #160967)

2025-09-26 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/160967 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 99a29f6 - Revert "[clang][DebugInfo][NFC] Simplify CollectRecordLambdaFields" (#160932)

2025-09-26 Thread via cfe-commits
Author: Petr Hosek Date: 2025-09-26T19:55:43Z New Revision: 99a29f640809f32d1271ed5cac9764b839daeed1 URL: https://github.com/llvm/llvm-project/commit/99a29f640809f32d1271ed5cac9764b839daeed1 DIFF: https://github.com/llvm/llvm-project/commit/99a29f640809f32d1271ed5cac9764b839daeed1.diff LOG: Re

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - bugprone-loop-variable-copied-then-modified + +bugprone-loop-variable-copied-then-modified +=== + +Detects when a loop variable is copied and then subsequently (possibly) modified +and suggests repl

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread via cfe-commits
@@ -0,0 +1,36 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - bugprone-loop-variable-copied-then-modified + +bugprone-loop-variable-copied-then-modified +=== + +Detects when a loop variable is copied and then subsequently (possibly) modified E

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - bugprone-loop-variable-copied-then-modified + +bugprone-loop-variable-copied-then-modified +=== + +Detects when a loop variable is copied and then subsequently (possibly) modified +and suggests repl

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-26 Thread Julia Hansbrough via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-loop-variable-copied-then-modified %t flowerhack wrote: C++17 has class template argument deduction, and I thought it'd be a useful test case to see if the FixIt does the correct thing

[clang] [clang-format] Add support for additional C++ declaration specifiers in QualifierOrder (PR #160853)

2025-09-26 Thread Björn Schäpers via cfe-commits
@@ -1384,6 +1397,65 @@ TEST_F(QualifierFixerTest, TemplatesLeft) { "TemplateType t;", Style); } +TEST_F(QualifierFixerTest, NewQualifierSupport) { + FormatStyle Style = getLLVMStyle(); + Style.QualifierAlignment = FormatStyle::QAS_Custom; + + // Test typede

[clang] [clang-tools-extra] [lldb] [clang] NFCI: Clean up `CompilerInstance::create{File,Source}Manager()` (PR #160748)

2025-09-26 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: There is an additional reference to this function in polly https://github.com/llvm/llvm-project/blob/d48bda5421c5af9baa5bc98ba4e3a453937ff96a/polly/lib/External/isl/interface/extract_interface.cc#L550 https://github.com/llvm/llvm-project/pull/160748 ___

[clang] [clang-format] Add -r option for recursing into directories (PR #160299)

2025-09-26 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: I actually wanted to use that option 3 days ago, but it didn't exist. ;) I would be in favor of having it. And while I understand the raised concerns, I see it more of a convenience to just use clang-format. https://github.com/llvm/llvm-project/pull/160299

[clang] [CIR] Upstream RTTI Builder & RTTI for VTable Definitions (PR #160002)

2025-09-26 Thread Andy Kaylor via cfe-commits
=?utf-8?q?“Amr?= , =?utf-8?q?“Amr?= , =?utf-8?q?“Amr?= Message-ID: In-Reply-To: @@ -424,6 +455,1006 @@ void CIRGenItaniumCXXABI::emitVirtualInheritanceTables( vtables.emitVTTDefinition(vtt, cgm.getVTableLinkage(rd), rd); } +namespace { +class CIRGenItaniumRTTIBuilder { +

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread via cfe-commits
YexuanXiao wrote: @sharadhr @aganea @Andarwinux @zmodem I suggest we focus on the following two points to avoid getting bogged down in irrelevant discussions raised by the author: 1. Regardless of the libraries and header files, does this patch **make Clang's API more consistent**, making it e

[clang] [llvm] [mlir] [clang] Use the VFS to create the OpenMP region entry ID (PR #160918)

2025-09-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/160918 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-26 Thread via cfe-commits
https://github.com/arrowten edited https://github.com/llvm/llvm-project/pull/156436 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: >From what I can see from a cursory glance, there is some additional piece of >content in this change: it is introducing a new `-std=stl` for using the MS >STL as a standard C++ library, a new `vcruntime` parameter for `-rtlib=` and >`-libunwind=`. I think that adding support

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Sharadh Rajaraman via cfe-commits
sharadhr wrote: @YexuanXiao fair point. 1. Perhaps. I am more in favour of aliasing `--sysroot` as `/winsysroot` for `clang-cl` rather than fundamentally changing the delivery, layout, or otherwise significantly modifying the Windows SDK/MSVC libraries and headers. There are more accessible,

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-09-26 Thread Alexandre Ganea via cfe-commits
aganea wrote: @trcrsired Can you try https://crates.io/crates/xwin? (and use it with `--use-winsysroot-style`) This achieves the same effect as what you're doing here it seems. In practical terms, one can then do `clang-cl /winsysroot ...` as usual from Linux. Chromium does cross-compilation a

[clang] [clang] Implement __builtin_stdc_rotate_left, __builtin_stdc_rotate_right (PR #160259)

2025-09-26 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/160259 >From db50769a3a42fd5a23a5900d2ac8497f0aece893 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Tue, 23 Sep 2025 02:17:49 -0700 Subject: [PATCH] [clang] Implement __builtin_stdc_rotate_{left,right}

[clang] [llvm] [HLSL] Update Frontend to support version 1.2 of root signature (PR #160616)

2025-09-26 Thread Justin Bogner via cfe-commits
@@ -9469,10 +9469,10 @@ def fdx_rootsignature_version : Group, Visibility<[ClangOption, CC1Option]>, HelpText<"Root Signature Version">, - Values<"rootsig_1_0,rootsig_1_1">, + Values<"rootsig_1_0,rootsig_1_1,rootsig_1_2">, NormalizedValuesScope<"llvm::dxbc::RootSigna

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -2198,8 +2211,16 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) { } llvm::Type *ResTy = ConvertType(Ty); - if (Ty->hasBooleanRepresentation() || Ty->isBitIntType() || - Ty->i

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `modernize-deprecated-headers` (PR #160967)

2025-09-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Victor Chernyakin (localspook) Changes - `IncludeModernizePPCallbacks` creates a temporary vector when all it needs is a constant array - The header replacement strings are `std::string` when they can just be `StringRef` - `In

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -2198,8 +2211,16 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) { } llvm::Type *ResTy = ConvertType(Ty); - if (Ty->hasBooleanRepresentation() || Ty->isBitIntType() || - Ty->i

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `modernize-deprecated-headers` (PR #160967)

2025-09-26 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook created https://github.com/llvm/llvm-project/pull/160967 - `IncludeModernizePPCallbacks` creates a temporary vector when all it needs is a constant array - The header replacement strings are `std::string` when they can just be `StringRef` - `IncludeModernizePPCall

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-26 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks so much for the prompt review! The latest commit: 1. Reordered the private/helper functions to keep the original order as much as possible (and processed with clang-format). `sanitizeDiagOpts` is the outstanding one since it is used in two different files and I kept its

[clang] [clang] Use the VFS to get the unique file ID (PR #160936)

2025-09-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This PR uses the VFS to get the unique file ID when printing externalized decls in CUDA instead of going straight to the real file system. This matches the behavior of other input files of the compiler.

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -2198,8 +2211,16 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) { } llvm::Type *ResTy = ConvertType(Ty); - if (Ty->hasBooleanRepresentation() || Ty->isBitIntType() || - Ty->i

[clang] [CIR] Set the module name to the input filename (PR #160934)

2025-09-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/160934 This sets the MLIR module name to the main filename (according to the SourceManager), if one is available. The module name gets used when creating global init functions, so we will need it to be set. >From

[clang] [clang] Implement -fstrict-bool (PR #160790)

2025-09-26 Thread Bruno De Fraine via cfe-commits
=?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -2198,8 +2211,16 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) { } llvm::Type *ResTy = ConvertType(Ty); - if (Ty->hasBooleanRepresentation() || Ty->isBitIntType() || - Ty->i

[clang] [clang] Load `-fembed-offload-object=` through the VFS (PR #160906)

2025-09-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/160906 This PR loads the path from `-fembed-offload-object=` through the VFS rather than going straight to the real file system. This matches the behavior of other input files of the compiler. This technically ch

[clang] [llvm] [clang] Use the VFS in `ModuleDependencyCollector` (PR #160944)

2025-09-26 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/160944 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement logical not for VectorType (PR #160762)

2025-09-26 Thread Andy Kaylor via cfe-commits
=?utf-8?q?=E2=80=9CAmr?= Message-ID: In-Reply-To: https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/160762 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/

  1   2   3   4   5   >