[clang] 1bcec03 - [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (#134753)

2025-04-14 Thread via cfe-commits
Author: Alex Voicu Date: 2025-04-15T00:47:09+03:00 New Revision: 1bcec036e197f6ab7461722502e4393396b46ec3 URL: https://github.com/llvm/llvm-project/commit/1bcec036e197f6ab7461722502e4393396b46ec3 DIFF: https://github.com/llvm/llvm-project/commit/1bcec036e197f6ab7461722502e4393396b46ec3.diff LO

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-14 Thread Owen Pan via cfe-commits
@@ -293,15 +293,14 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-14 Thread Owen Pan via cfe-commits
@@ -5687,11 +5687,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[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] Disable -fdollars-in-identifiers by default (PR #135407)

2025-04-14 Thread Owen Pan via cfe-commits
@@ -4036,6 +4036,7 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) { LangOpts.MicrosoftExt = 1;// To get kw___try, kw___finally. LangOpts.DeclSpecKeyword = 1; // To get __declspec. LangOpts.C99 = 1; // To get kw_restrict for non-underscore-prefixed res

[clang] [Clang] Add support for GCC bound member functions extension (PR #135649)

2025-04-14 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/135649 >From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 12:12:19 +0800 Subject: [PATCH 1/3] [Clang] Add support for GCC bound member functions extensio

[clang] ff687af - [clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (#133546)

2025-04-14 Thread via cfe-commits
Author: Jan Górski Date: 2025-04-14T14:26:10-07:00 New Revision: ff687af04f5b0e85305250587b524cb0b3849aa0 URL: https://github.com/llvm/llvm-project/commit/ff687af04f5b0e85305250587b524cb0b3849aa0 DIFF: https://github.com/llvm/llvm-project/commit/ff687af04f5b0e85305250587b524cb0b3849aa0.diff LO

[clang] [clang] [Driver] Fix respecting libdir when locating flang runtime (PR #127345)

2025-04-14 Thread Michał Górny via cfe-commits
https://github.com/mgorny closed https://github.com/llvm/llvm-project/pull/127345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-14 Thread Owen Pan via cfe-commits
@@ -293,15 +293,14 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-14 Thread Owen Pan via cfe-commits
@@ -5687,11 +5687,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-14 Thread Owen Pan via cfe-commits
@@ -5687,11 +5687,9 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShortF

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

2025-04-14 Thread via cfe-commits
Losy001 wrote: Ping 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] [Clang] Add support for GCC bound member functions extension (PR #135649)

2025-04-14 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/135649 >From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 12:12:19 +0800 Subject: [PATCH 1/2] [Clang] Add support for GCC bound member functions extensio

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-04-14 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/125643 >From 0aebcd7119fbcd51154c5d9706752e8ff3f041bc Mon Sep 17 00:00:00 2001 From: ShashwathiNavada Date: Tue, 4 Feb 2025 00:16:09 -0600 Subject: [PATCH 1/7] Adding diagnostics for unsupported option --- c

[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] [clang] [Driver] Fix respecting libdir when locating flang runtime (PR #127345)

2025-04-14 Thread Michał Górny via cfe-commits
mgorny wrote: Closed in favor of #134362. https://github.com/llvm/llvm-project/pull/127345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134769 >From 7fe930def5714c196d003e94bafdb4639cea3a43 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 22:44:20 -0300 Subject: [PATCH] [clang] consistently quote expressions in diagnostics This ch

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134769 >From e2c40042553845125914e544e696d7e21b553e7d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 22:44:20 -0300 Subject: [PATCH] [clang] consistently quote expressions in diagnostics This ch

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-04-14 Thread via cfe-commits
matts1 wrote: > The issue is that if we allow the preprocessor's state to differ across > modules, then the resulting compiled units can be arbitrary (and subtly > incompatible). > > I wonder if a possible solution is to record which macros are used (ie, are > expanded or appear in `#ifdef` /

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-14 Thread via cfe-commits
@@ -1117,16 +1205,27 @@ class Sema; SmallVector Candidates; llvm::SmallPtrSet Functions; -// Allocator for ConversionSequenceLists. We store the first few of these +DeferredTemplateOverloadCandidate *FirstDeferredCandidate; +unsigned DeferredCandidatesCount

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-14 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis updated https://github.com/llvm/llvm-project/pull/131477 From d3da72bf61ae8268a25e5331acefe895c783905a Mon Sep 17 00:00:00 2001 From: Gergely Meszaros Date: Sat, 15 Mar 2025 22:37:07 +0100 Subject: [PATCH 1/2] [Clang][Sema] Fix -Whigher-precision-for-complex-division

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-14 Thread Mészáros Gergely via cfe-commits
@@ -349,6 +349,17 @@ Improvements to Clang's diagnostics - Now correctly diagnose a tentative definition of an array with static storage duration in pedantic mode in C. (#GH50661) +- ``-Whigher-precisision-for-complex-divison`` no longer incorrectly warns when the divisor i

[clang] [Clang][CodeGen][OpenCL] Add `-fno-delete-null-pointer-checks` to avoid UB. NFC. (PR #135602)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s efriedma-quic wrote: I don't see any optimi

[clang] Merge similar Clang Thread Safety attributes (PR #135561)

2025-04-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the cleanup! The behavioral changes all seem defensible to me. Should those have a release note? https://github.com/llvm/llvm-project/pull/135561 ___ cfe-commits mailing l

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-14 Thread via cfe-commits
cor3ntin wrote: @Sterling-Augustine Oliver is looking into it. Given it's a relatively large patch, I'd rather wait a day until reverting to avoid churn. Will that work for you? https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -485,6 +485,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -14794,9 +14803,36 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } -static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType, +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, +

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: By the way, looked at the other tests in Modules directory and think that the test should start with "macro-" for consistency. Probably something like "macro-identifier-hiding.c" as we have "macro-hiding.cpp" already. https://github.com/llvm/ll

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Jan Svoboda via cfe-commits
@@ -3871,7 +3874,8 @@ class ASTIdentifierTableTrait { if (isInterestingIdentifier(II, MacroOffset)) { DataLen += 2; // 2 bytes for builtin ID DataLen += 2; // 2 bytes for flags - if (MacroOffset) + if (MacroOffset || (II->hasMacroDefinition() && +

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread via cfe-commits
Sterling-Augustine wrote: Thanks from this side too. Appreciate the speed. https://github.com/llvm/llvm-project/pull/135686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Merge similar Clang Thread Safety attributes (PR #135561)

2025-04-14 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: I think it's obscure enough to not need to be mentioned. Since I went with the less intrusive variant of downgrading an error to warning, it should not break anyone's code. I'd be open to add `ErrorDiag` on all thread safety attributes, but I'd do so in a separate change i

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Jan Svoboda via cfe-commits
@@ -2419,6 +2422,9 @@ namespace { // declarations it needs. ++NumIdentifierLookupHits; Found = *Pos; + if (Trait.hasMoreInformationInDependencies()) +// Look for the identifier in extra modules as they contain more info. +return false; ---

[clang-tools-extra] [clang-doc] Use SmartMutex when visiting the AST (PR #135514)

2025-04-14 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath approved this pull request. https://github.com/llvm/llvm-project/pull/135514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes The P2719 implementation refactored diagnostics for cleanup delete, and as part of that I attempted to fix handling of inaccessible cleanup operator delete. Alas the new branch was incorrect as it was performi

[clang] [llvm] [NFC] Fix xmipscmov extension name (PR #135647)

2025-04-14 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -2,7 +2,6 @@ // RUN: not %clang_cc1 %s -o - -S -triple=amdgcn-amd-amdhsa 2>&1 | FileCheck %s void test_amdgcn_fence_failure() { - - // CHECK: error: Unsupported atomic synchronization scope + // CHECK: error: :0:0: in function _Z25test_amdgcn_fence_failurev void (): Unsu

[clang] [Clang] Forward two linker options to `lld` when ThinLTO is enabled for AMDGPU (PR #135690)

2025-04-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/135690 None >From c1fd5f3f3493b4e5b553438f023fde77d721199b Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 14 Apr 2025 18:46:45 -0400 Subject: [PATCH] [Clang] Forward two linker options to `lld` when ThinLTO is

[clang] [Clang] Forward two linker options to `lld` when ThinLTO is enabled for AMDGPU (PR #135690)

2025-04-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/135690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Forward two linker options to `lld` when ThinLTO is enabled for AMDGPU (PR #135690)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135690.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+10-1) - (modified) clang/test

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread via cfe-commits
https://github.com/Sterling-Augustine approved this pull request. https://github.com/llvm/llvm-project/pull/135686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-14 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/135691 >From 7bb8bc392d2ea0a0deabb69117da3305ac3137af Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 14 Apr 2025 10:37:59 -0700 Subject: [PATCH] [Clang] [Driver] add a Cygwin ToolChain Add a new Cygwin too

[clang] [llvm] [NFC] Fix bot breakage introduced by #134753 (PR #135697)

2025-04-14 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/135697 This test needs the amdgpu target, and its absence wreaked havoc with some of the bots, therefore we now require it. >From a988ecf63dc79d226c2f7aa1430f65d08256888b Mon Sep 17 00:00:00 2001 From: Alex Voicu Dat

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -350,20 +350,87 @@ void func7() { // OGCG: %[[ARR:.*]] = alloca [1 x ptr], align 8 // OGCG: call void @llvm.memset.p0.i64(ptr align 8 %[[ARR]], i8 0, i64 8, i1 false) -void func8(int p[10]) {} -// CIR: cir.func @func8(%arg0: !cir.ptr -// CIR: cir.alloca !cir.ptr, !cir.ptr>

[clang] 984ec70 - Minor documentation update.

2025-04-14 Thread Peter Collingbourne via cfe-commits
Author: Peter Collingbourne Date: 2025-04-14T19:50:37-07:00 New Revision: 984ec70b61cb57b00e622a21b259aaf11775c5f0 URL: https://github.com/llvm/llvm-project/commit/984ec70b61cb57b00e622a21b259aaf11775c5f0 DIFF: https://github.com/llvm/llvm-project/commit/984ec70b61cb57b00e622a21b259aaf11775c5f0

[clang] [Clang][CodeGen][OpenCL] Add `-fno-delete-null-pointer-checks` to avoid UB. NFC. (PR #135602)

2025-04-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. https://github.com/llvm/llvm-project/pull/135602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-14 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng approved this pull request. LGTM :) https://github.com/llvm/llvm-project/pull/132481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][tests] Add missing FileCheck check, NFC (PR #135687)

2025-04-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/135687 None >From d105489358661b0cd38b447592ff3e69a5641a7c Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 14 Apr 2025 15:01:45 -0700 Subject: [PATCH] [clang][tests] Add missing FileCheck check, NFC --- c

[clang] [Mips] Fix clang compile error when -march=p5600 with -mmsa (PR #132679)

2025-04-14 Thread via cfe-commits
yingopq wrote: Ping. https://github.com/llvm/llvm-project/pull/132679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/135686 The P2719 implementation refactored diagnostics for cleanup delete, and as part of that I attempted to fix handling of inaccessible cleanup operator delete. Alas the new branch was incorrect as it was performing

[clang] [clang] [CodeGen] fix crash when Ty isDependentType in CodeGenFunction::EmitAutoVarAlloca (PR #135643)

2025-04-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm not really sure how to go about reducing a testcase in that case; it's not something I've ever run into myself. Please post on Discourse (https://discourse.llvm.org/); maybe someone else has some ideas. https://github.com/llvm/llvm-project/pull/135643

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/135473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-x86_64-windows` running on `minipc-ryzen-win` while building `clang` at step 6 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/166/builds/994 Here is the relevant piece of

[clang] [clang] Enable making `CompilerInstance` VFS thread-safe (PR #135737)

2025-04-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/135737 The `llvm::vfs::FileSystem` interface makes no promises around thread-safety. To enable making `CompilerInstance` thread-safe, this PR allows passing an explicit VFS to `cloneForModuleCompile()`. This will

[clang] [clang] Enable making `CompilerInstance` VFS thread-safe (PR #135737)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes The `llvm::vfs::FileSystem` interface makes no promises around thread-safety. To enable making `CompilerInstance` thread-safe, this PR allows passing an explicit VFS to `cloneForModuleCompile()`. This wi

[clang] [clang] [CodeGen] fix crash when Ty isDependentType in CodeGenFunction::EmitAutoVarAlloca (PR #135643)

2025-04-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Also, if you're okay with publicly posting your code, it's fine to file a bug with an unreduced testcase. https://github.com/llvm/llvm-project/pull/135643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-04-14 Thread via cfe-commits
macurtis-amd wrote: > I don't, but I wonder what's the GCC behavior. It seems to suppress the > diagnostic when processing a .i file. Diagnostic seems to be suppressed by [-fpreprocessed](https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-fpreprocessed), which is implicit if y

[clang] [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (PR #135679)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes NB: This only fixes the crash introduced in Clang 19; we still accept this code even though we shouldn’t: ```c++ struct S { friend int f() { return 3; } friend int f() = delete; }; ``` I tried figuring out a

[clang] [Reland][Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #135135)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -3615,6 +3618,23 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF, .addAttribute(llvm::Attribute::NoUnwind); } B.addUWTableAttr(llvm::UWTableKind::Default); + // Add more precise attributes to recoverable ubsan handlers for better + // optimizations. +

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Tom Honermann via cfe-commits
@@ -14794,9 +14803,36 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } -static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType, +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, +

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Yaxun Liu via cfe-commits
@@ -57,6 +57,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" +#include "llvm/Support/ThreadPool.h" yxsamliu wrote: will remove https://github.com/llvm/llvm-project/pull/135229

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX) gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs ../include/clang/Basic/Diagnostic.td "${docs_targets}") gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs ../include/clang/Driver/ClangOptionDocs.td

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/135655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Forward two linker options to `lld` when ThinLTO is enabled for AMDGPU (PR #135690)

2025-04-14 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#135690** https://app.graphite.dev/github/pr/llvm/llvm-project/135690?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/135

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM as well. https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [liblc] only check filename part of the source for avoiding duplication (PR #135710)

2025-04-14 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/135710 llvm-diff shows this PR has no changes to amdgcn--amdhsa.bc. Motivation is that in our downstream the same category of target built-ins, e.g. math, are organized in several different folders. For example, in t

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/135493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f4ff209 - [Clang] Forward two linker options to `lld` when ThinLTO is enabled for AMDGPU (#135690)

2025-04-14 Thread via cfe-commits
Author: Shilei Tian Date: 2025-04-14T20:57:20-04:00 New Revision: f4ff209e4384d8073f36fb7da9916b33f1140edf URL: https://github.com/llvm/llvm-project/commit/f4ff209e4384d8073f36fb7da9916b33f1140edf DIFF: https://github.com/llvm/llvm-project/commit/f4ff209e4384d8073f36fb7da9916b33f1140edf.diff L

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/134769 >From 7a777961125a31a8e721f2f78354a3b21c0a06b2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 7 Apr 2025 22:44:20 -0300 Subject: [PATCH] [clang] consistently quote expressions in diagnostics This ch

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-04-14 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-14 Thread via cfe-commits
Sirraide wrote: > Sorry about that. This PR had become so stale that there merge conflicts and > the easiest way to fix it was to squash because the conflicts were with > things I later removed. I see, yeah, it happens; that’s unfortunate... https://github.com/llvm/llvm-project/pull/106321 _

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sean McBride (seanm) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135720.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp (-1) ``diff diff --git a/clan

[clang] 83344da - [Clang] Fix dependent local class instantiation bugs (#134038)

2025-04-14 Thread via cfe-commits
Author: Younan Zhang Date: 2025-04-15T09:16:55+08:00 New Revision: 83344da69145a648aad3e0cd88eab4aaf60b2142 URL: https://github.com/llvm/llvm-project/commit/83344da69145a648aad3e0cd88eab4aaf60b2142 DIFF: https://github.com/llvm/llvm-project/commit/83344da69145a648aad3e0cd88eab4aaf60b2142.diff

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/134038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/135229 >From 5c2283b01ac6a58e41df4260aecc01bcf463a0a9 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 10 Apr 2025 14:14:47 -0400 Subject: [PATCH] [Clang] add option --offload-jobs=N for specifying number

[clang] [Clang][CodeGen][OpenCL] Add `-fno-delete-null-pointer-checks` to avoid UB. NFC. (PR #135602)

2025-04-14 Thread Yingwei Zheng via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s dtcxzyw wrote: The default optimization lev

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @Sterling-Augustine thank you! https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread John McCall via cfe-commits
https://github.com/rjmccall requested changes to this pull request. Flagging as changes requested to at least verify that this doesn't change ABI for Darwin. https://github.com/llvm/llvm-project/pull/135564 ___ cfe-commits mailing list cfe-commits@lis

[clang] 41892fc - [CLANG-CL] ignores Wpadded (#134426)

2025-04-14 Thread via cfe-commits
Author: Theo de Magalhaes Date: 2025-04-14T14:17:49-07:00 New Revision: 41892fc4353d2dd705666783d799e79748467ed8 URL: https://github.com/llvm/llvm-project/commit/41892fc4353d2dd705666783d799e79748467ed8 DIFF: https://github.com/llvm/llvm-project/commit/41892fc4353d2dd705666783d799e79748467ed8.d

[clang] [CLANG-CL] ignores Wpadded (PR #134426)

2025-04-14 Thread Eli Friedman via cfe-commits
=?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes ,Theo de Magalhaes , =?utf-8?q?Théo?= De Mag

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -485,6 +485,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

[clang] [clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (PR #133546)

2025-04-14 Thread Jan Górski via cfe-commits
janagor wrote: Oh, I see, I changed it. https://github.com/llvm/llvm-project/pull/133546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-14 Thread via cfe-commits
Sterling-Augustine wrote: Yes it does. Here is a reduced repro: ``` augustine:~/crdc $ cat repro.ii extern void* GetMem(); class MyFileMod { public: MyFileMod(int x, int y) {} void SetNext() {} friend class Foo; private: static void * operator new(unsigned long size) { return GetMem()

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/135655 >From 7ec850f4a31cdd4554d813f759f519cb688652f9 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Mon, 14 Apr 2025 14:07:30 -0400 Subject: [PATCH 1/2] [Clang][DirectX] Always use Diagnostic Printer fixes #135654

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/135564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/135229 >From 6aae774e5729779b1e9fd8fee792c06cbc00f29a Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 10 Apr 2025 14:14:47 -0400 Subject: [PATCH] [Clang] add option --offload-jobs=N for specifying number

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. LG, one nit. https://github.com/llvm/llvm-project/pull/135229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM with the PreferredBaseAlign thing fixed. https://github.com/llvm/llvm-project/pull/135564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks for the quick fix https://github.com/llvm/llvm-project/pull/135686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/135686 >From 62be33b3aa475a33d1c11679ed069eb2af981754 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 14 Apr 2025 15:02:46 -0700 Subject: [PATCH] [Clang]Ensure correct handling of access control in P2719 diagnost

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Thanks for the quick fix it's so very very stupid :O https://github.com/llvm/llvm-project/pull/135686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,89 @@ +//==-- ABIArgInfo.h - Abstract info regarding ABI-specific arguments ---==// +// +// 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] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk edited https://github.com/llvm/llvm-project/pull/135564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve ``-Wtautological-overlap-compare`` diagnostics flag (PR #133653)

2025-04-14 Thread via cfe-commits
@@ -1170,82 +1171,117 @@ class CFGBuilder { if (!areExprTypesCompatible(NumExpr1, NumExpr2)) return {}; +// Check that the two expressions are of the same type. Expr::EvalResult L1Result, L2Result; -if (!NumExpr1->EvaluateAsInt(L1Result, *Context) || -

[clang] [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (PR #135679)

2025-04-14 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/135679 NB: This only fixes the crash introduced in Clang 19; we still accept this code even though we shouldn’t: ```c++ struct S { friend int f() { return 3; } friend int f() = delete; }; ``` I tried figuring

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/135655 fixes #135654 In #128613 we added safe guards to prevent the lowering of just any intrinsic in the backend. We used `DiagnosticInfoUnsupported` to do this. What we found was when using `opt` the diagnostic pri

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/135229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -717,6 +717,13 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee(); + CalleeDecl && CalleeDecl->hasAttr()) { +Diag(St->getBeginLoc(), diag::err_musttail_mismatch) <<

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/135105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread John McCall via cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---

  1   2   3   4   5   >