[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-06 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,39 @@ +//===--===// +// +// 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] [CIR] Emit init of local variables (PR #130164)

2025-03-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/130164 Local variable initialization was previously being ignored. This change adds support for initialization of scalar variables with constant values and introduces the constant emitter framework. >From 69c71043

[clang] [CIR] Emit init of local variables (PR #130164)

2025-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes Local variable initialization was previously being ignored. This change adds support for initialization of scalar variables with constant values and introduces the constant emitter framework. --- Patch i

[clang] [clang][dataflow] Add test for crash repro and clean up const accessor handling (PR #129930)

2025-03-06 Thread Jan Voung via cfe-commits
@@ -551,91 +551,92 @@ void transferCallReturningOptional(const CallExpr *E, setHasValue(*Loc, State.Env.makeAtomicBoolValue(), State.Env); } +// Returns true if the const accessor is handled by caching. +// Returns false if we could not cache. We should perform default handl

[clang] [clang][dataflow] Add test for crash repro and clean up const accessor handling (PR #129930)

2025-03-06 Thread Jan Voung via cfe-commits
@@ -551,91 +551,92 @@ void transferCallReturningOptional(const CallExpr *E, setHasValue(*Loc, State.Env.makeAtomicBoolValue(), State.Env); } +// Returns true if the const accessor is handled by caching. +// Returns false if we could not cache. We should perform default handl

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-03-06 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/129113 >From b274bb5ef53ffc13093a5d454295cba21640dc4e Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 27 Feb 2025 11:54:41 -0800 Subject: [PATCH 1/2] [Clang][Docs][NFC] Correct documentation for the CPATH

[clang] 9a0e652 - [www] Update the C++ status pages for Clang 20

2025-03-06 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-06T16:06:51-05:00 New Revision: 9a0e652ec7e38b4ae18b744071d4d3906210bc04 URL: https://github.com/llvm/llvm-project/commit/9a0e652ec7e38b4ae18b744071d4d3906210bc04 DIFF: https://github.com/llvm/llvm-project/commit/9a0e652ec7e38b4ae18b744071d4d3906210bc04.diff

[clang] 1493f42 - [OpenACC] Add test changes missed in 7d8da04

2025-03-06 Thread via cfe-commits
Author: erichkeane Date: 2025-03-06T13:16:57-08:00 New Revision: 1493f420600b4a4284a6bb08f1867ecb7bebdcbb URL: https://github.com/llvm/llvm-project/commit/1493f420600b4a4284a6bb08f1867ecb7bebdcbb DIFF: https://github.com/llvm/llvm-project/commit/1493f420600b4a4284a6bb08f1867ecb7bebdcbb.diff LO

[clang] [CLANG-CL] Remove the 'static' specifier for _FUNCTION_ in MSVC mode. (PR #128184)

2025-03-06 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/128184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit init of local variables (PR #130164)

2025-03-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/130164 >From 69c7104391ff9b6ae1dbcb6275a3070da4f8dd02 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 4 Mar 2025 10:21:24 -0800 Subject: [PATCH 1/2] [CIR] Emit init of local variables Local variable initializ

[clang] [Clang] Make '-Wglobal-constructors` work on the GNU attributes (PR #129917)

2025-03-06 Thread Erich Keane via cfe-commits
@@ -2138,6 +2138,8 @@ static void handleConstructorAttr(Sema &S, Decl *D, const ParsedAttr &AL) { if (AL.getNumArgs() && !S.checkUInt32Argument(AL, AL.getArgAsExpr(0), priority)) return; + S.Diag(D->getLocation(), diag::warn_global_constructor) er

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/129285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reject constexpr-unknown values as constant expressions more consistently (PR #129952)

2025-03-06 Thread Eli Friedman via cfe-commits
@@ -154,3 +154,26 @@ int g() { static_assert(f(arr) == 5); } } + +namespace GH128409 { + int &ff(); + int &x = ff(); // nointerpreter-note {{declared here}} + constinit int &z = x; // expected-error {{variable does not have a constant initializer}} +

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

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

[clang] [clang][test] Fix -DBUILD_SHARED_LIBS build by adding depency on Targ… (PR #130105)

2025-03-06 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Tests pass, ok to merge @nikic @kito-cheng ? https://github.com/llvm/llvm-project/pull/130105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Yet another __builtin_constant_p implementation (PR #130143)

2025-03-06 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/130143 >From 3bdebdee5bce1891b05807a78a639d72e72cd52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 6 Mar 2025 16:18:49 +0100 Subject: [PATC

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-06 Thread Joshua Batista via cfe-commits
@@ -35,25 +35,48 @@ namespace hlsl { #define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage) #endif -#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL) \ - GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL) \

[clang] [llvm] Add support for template as type parameter (PR #127654)

2025-03-06 Thread via cfe-commits
https://github.com/ykhatav updated https://github.com/llvm/llvm-project/pull/127654 >From 2714184615ef06027941c7bccee3a2453d76c24b Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Tue, 18 Feb 2025 06:44:49 -0800 Subject: [PATCH 1/9] Support template as type --- clang/include/clang/B

[clang] bfea849 - clang: Hack around opencl enqueue_block using wrong ABI for aggregrate (#130011)

2025-03-06 Thread via cfe-commits
Author: Matt Arsenault Date: 2025-03-06T23:13:28+07:00 New Revision: bfea84946d860ac5cae978323597556268c90f7a URL: https://github.com/llvm/llvm-project/commit/bfea84946d860ac5cae978323597556268c90f7a DIFF: https://github.com/llvm/llvm-project/commit/bfea84946d860ac5cae978323597556268c90f7a.diff

[clang] clang: Do not implicitly addrspacecast in EmitAggExprToLValue (PR #129837)

2025-03-06 Thread Matt Arsenault via cfe-commits
arsenm wrote: Replaced by https://github.com/llvm/llvm-project/pull/130011 https://github.com/llvm/llvm-project/pull/129837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Hack around opencl enqueue_block using wrong ABI for aggregrate (PR #130011)

2025-03-06 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/130011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c628e8e - [clang] Fix FP -Wformat in functions with 2+ attribute((format)) (#129954)

2025-03-06 Thread via cfe-commits
Author: apple-fcloutier Date: 2025-03-06T09:12:22-08:00 New Revision: c628e8e9ea86a225af846875740d0189f7cd3722 URL: https://github.com/llvm/llvm-project/commit/c628e8e9ea86a225af846875740d0189f7cd3722 DIFF: https://github.com/llvm/llvm-project/commit/c628e8e9ea86a225af846875740d0189f7cd3722.dif

[clang] d01a06b - [clang][test] Fix shared build after Module Triple change. NFC

2025-03-06 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2025-03-06T13:20:06-05:00 New Revision: d01a06b844cca2000137b7257025d22d0adcfa80 URL: https://github.com/llvm/llvm-project/commit/d01a06b844cca2000137b7257025d22d0adcfa80 DIFF: https://github.com/llvm/llvm-project/commit/d01a06b844cca2000137b7257025d22d0adcfa80.diff

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-06 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. This looks good to me and it should be possible to use this for CHERI downstream as well. https://github.com/llvm/llvm-project/pull/121957 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-06 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/121957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-06 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/129934 >From 1bfd3712eeab8884ff44a5eab38293d33b917d66 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Wed, 5 Mar 2025 15:49:06 -0500 Subject: [PATCH] Reduce memory usage in AST parent map generation

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-06 Thread via cfe-commits
@@ -70,16 +94,38 @@ class ParentMapContext::ParentMap { push_back(Value); } bool contains(const DynTypedNode &Value) { - return Seen.contains(Value); + assert(Value.getMemoizationData()); + bool found = FragileLazySeenCache.contains(&Value); -

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-06 Thread via cfe-commits
@@ -70,16 +93,37 @@ class ParentMapContext::ParentMap { push_back(Value); } bool contains(const DynTypedNode &Value) { - return Seen.contains(Value); + assert(Value.getMemoizationData()); + bool found = FragileLazySeenCache.contains(&Value); +

[clang] 710de09 - [CIR] Upstream global variable linkage types (#129072)

2025-03-06 Thread via cfe-commits
Author: Morris Hafner Date: 2025-03-06T10:17:58-08:00 New Revision: 710de09f17866c75e1b971059b3cb735fbbee408 URL: https://github.com/llvm/llvm-project/commit/710de09f17866c75e1b971059b3cb735fbbee408 DIFF: https://github.com/llvm/llvm-project/commit/710de09f17866c75e1b971059b3cb735fbbee408.diff

[clang] [CIR] Emit init of local variables (PR #130164)

2025-03-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 1 comment, but I don't feel comfortable approving this with some of the work, so I'll count on the CIR reviewers (David, Henrick, Bruno, Nathan, etc) to do the approval. https://github.com/llvm/llvm-project/pull/130164 __

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-06 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: This needs a higher-level description of the overall goal, and why you've picked the specific instrumentation points you've chosen. https://github.com/llvm/llvm-project/pull/130103 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [CIR] Emit init of local variables (PR #130164)

2025-03-06 Thread Erich Keane via cfe-commits
@@ -0,0 +1,322 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-06 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: That's a good point. @haoNoQ @Xazax-hun @steakhal Do you see any implications on this patch when running clang static analyzer via clang-tidy? Any checks that would stop detecting issues? TLD

[clang] 1b75b9e - [OpenACC] Handle sema for gang, worker, vector, seq clauses on routine

2025-03-06 Thread via cfe-commits
Author: erichkeane Date: 2025-03-06T11:53:46-08:00 New Revision: 1b75b9e665ee3c43de85c25f8d5f10d4efb3ca39 URL: https://github.com/llvm/llvm-project/commit/1b75b9e665ee3c43de85c25f8d5f10d4efb3ca39 DIFF: https://github.com/llvm/llvm-project/commit/1b75b9e665ee3c43de85c25f8d5f10d4efb3ca39.diff LO

[clang] [clang][dataflow] Add test for crash repro and clean up const accessor handling (PR #129930)

2025-03-06 Thread Yitzhak Mandelbaum via cfe-commits
@@ -551,15 +551,18 @@ void transferCallReturningOptional(const CallExpr *E, setHasValue(*Loc, State.Env.makeAtomicBoolValue(), State.Env); } -void handleConstMemberCall(const CallExpr *CE, +bool handleConstMemberCall(const CallExpr *CE, ymand wrote: Please

[clang] a907246 - [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (#129113)

2025-03-06 Thread via cfe-commits
Author: Tom Honermann Date: 2025-03-06T13:01:30-05:00 New Revision: a907246fb29bd74dc025beb87a2ef1858a8d0dae URL: https://github.com/llvm/llvm-project/commit/a907246fb29bd74dc025beb87a2ef1858a8d0dae DIFF: https://github.com/llvm/llvm-project/commit/a907246fb29bd74dc025beb87a2ef1858a8d0dae.diff

<    1   2   3   4