[clang] [WebKit Checkers] Recognize Objective-C and CF pointer conversion functions. (PR #132784)

2025-03-27 Thread Ryosuke Niwa via cfe-commits
@@ -273,11 +279,148 @@ inline CFTypeRef bridge_cast(NSObject *object) return (__bridge CFTypeRef)object; } +template +struct ObjCTypeCastTraits { +public: +static bool isType(id object) { return [object isKindOfClass:[ExpectedType class]]; } + +template +sta

[clang] [NFC] [dataflow] generalize smart pointer caching (PR #133350)

2025-03-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/133350 >From 8ece858e76fad0962b2567f03bf80bcaf2828348 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 27 Mar 2025 18:25:23 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [Clang][NFC] Code cleanup in CGBuiltin.cpp (PR #132060)

2025-03-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Changes LGTM though I've added @efriedma-quic as a codegen code owner just in case he's got different opinions. https://github.com/llvm/llvm-project/pull/132060 ___ cfe-commits mailing list c

[clang] [NFC] [dataflow] generalize smart pointer caching (PR #133350)

2025-03-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/133350 >From 8ece858e76fad0962b2567f03bf80bcaf2828348 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 27 Mar 2025 18:25:23 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
https://github.com/cor3ntin commented: Did WG14 considered some sort of macros for this feature? Otherwise I'd be tempted to ask you to add something to `__has_feature`. I can see user wanting to use `_Countof` when available and fallback to something else when not. https://github.com/llvm/llv

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
@@ -0,0 +1,68 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * + * Adds an operator to get the length of an array. Note that WG14 N3469 renamed + * this operator to _Countof. + */ -

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
@@ -4338,6 +4338,21 @@ bool Sema::CheckUnaryExprOrTypeTraitOperand(Expr *E, E->getSourceRange(), ExprKind)) return true; + if (ExprKind == UETT_CountOf) { +// The type has to be an array type. We already checked for incomplete +

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
@@ -14926,6 +14926,42 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( return false; } + case UETT_CountOf: { cor3ntin wrote: Did you consider the new interpreter? @tbaederr https://github.com/llvm/llvm-project/pull/133125 ___

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/133125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-27 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj updated https://github.com/llvm/llvm-project/pull/131985 >From 63dec28732e6a90f5f3449441fa8472b5b60a9f4 Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Wed, 26 Mar 2025 07:29:18 + Subject: [PATCH] [clang][CodeGen] Generate follow-up metadata for loops in co

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/14277 Here

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From a7ccd0e0b261c303639d3880fc51b0ed99e17363 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/3] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [libc] [Clang] Make `--lto-partitions` only default for HIP (PR #133164)

2025-03-27 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh approved this pull request. https://github.com/llvm/llvm-project/pull/133164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread A. Jiang via cfe-commits
@@ -141,6 +141,12 @@ C2y Feature Support paper also introduced octal and hexadecimal delimited escape sequences (e.g., ``"\x{12}\o{12}"``) which are also supported as an extension in older C language modes. +- Implemented `WG14 N3369

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread via cfe-commits
@@ -19849,11 +19849,14 @@ static void DoMarkVarDeclReferenced( SemaRef.InstantiateVariableDefinition(PointOfInstantiation, Var); }); -// Re-set the member to trigger a recomputation of the dependence bits -// for the expression. -if (a

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-solaris11-sparcv9` running on `solaris11-sparcv9` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/6233 Here is the relevant piec

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-27 Thread Henrich Lauko via cfe-commits
@@ -826,6 +826,50 @@ def ForOp : CIR_Op<"for", [LoopOpInterface, NoRegionArguments]> { }]; } +//===--===// +// CmpOp +//===--===// + +def

[clang] Fix complex long double division with -mno-x87. (PR #133152)

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

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-27 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas updated https://github.com/llvm/llvm-project/pull/133077 >From 81df4736822848b35959aa067fc9d056ed868946 Mon Sep 17 00:00:00 2001 From: koplas Date: Thu, 27 Mar 2025 08:00:54 +0100 Subject: [PATCH 1/2] [PATCH] [clang][frontend] Fix serialization for CXXConstructorDecl

[clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/132103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-27 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping, thanks https://github.com/llvm/llvm-project/pull/131995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix complex long double division with -mno-x87. (PR #133152)

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

[libclc] [libclc] Move atan2/atan2pi to the CLC library (PR #133226)

2025-03-27 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff db98e2922f0121f2c6fb3d6f42b40f9774f9a563 497781f9fe1d1750d37a36948be285cdb6c14b04 --e

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-27 Thread Henrich Lauko via cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond", }]; } +//===--===// +// While & DoWhileOp +//===--===// + +class WhileOpBase : CIR_Op

[libclc] db98e29 - [libclc] Move log1p/asinh/acosh/atanh to the CLC library (#132956)

2025-03-27 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-03-27T09:19:07Z New Revision: db98e2922f0121f2c6fb3d6f42b40f9774f9a563 URL: https://github.com/llvm/llvm-project/commit/db98e2922f0121f2c6fb3d6f42b40f9774f9a563 DIFF: https://github.com/llvm/llvm-project/commit/db98e2922f0121f2c6fb3d6f42b40f9774f9a563.diff LOG

[clang] Fix complex long double division with -mno-x87. (PR #133152)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Zahira Ammarguellat (zahiraam) Changes The combination of `-fcomplex-arithmetic=promoted` and `mno-x87` for `double` complex division is leading to a crash. See https://godbolt.org/z/189G957oY This patch fixes that. --- Full diff:

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-27 Thread Henrich Lauko via cfe-commits
@@ -539,9 +539,29 @@ Block *cir::BrCondOp::getSuccessorForOperands(ArrayRef operands) { } //===--===// -// ForOp +// LoopOpInterface Methods //===---

[libclc] [libclc] Move atan2/atan2pi to the CLC library (PR #133226)

2025-03-27 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/133226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow `Language: Cpp` for C files (PR #133033)

2025-03-27 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/133033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/21

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/14490 Here is the relevan

[clang] [clang-format] Fix a regression on annotating template angles (PR #132885)

2025-03-27 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/132885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b8a0558 - [clang-format] Fix a regression on annotating template angles (#132885)

2025-03-27 Thread via cfe-commits
Author: Owen Pan Date: 2025-03-27T00:57:17-07:00 New Revision: b8a0558dea942b40f6cdcfaf9b6ba62d4140d693 URL: https://github.com/llvm/llvm-project/commit/b8a0558dea942b40f6cdcfaf9b6ba62d4140d693 DIFF: https://github.com/llvm/llvm-project/commit/b8a0558dea942b40f6cdcfaf9b6ba62d4140d693.diff LOG:

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro closed https://github.com/llvm/llvm-project/pull/132907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro approved this pull request. https://github.com/llvm/llvm-project/pull/132907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From a7ccd0e0b261c303639d3880fc51b0ed99e17363 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/2] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] 6294325 - [MIPS] Define SubTargetFeature for i6500 cpu (#132907)

2025-03-27 Thread via cfe-commits
Author: Mallikarjuna Gouda Date: 2025-03-27T08:48:34+01:00 New Revision: 6294325a535d8042a667ccfb4400a9f63e1bee63 URL: https://github.com/llvm/llvm-project/commit/6294325a535d8042a667ccfb4400a9f63e1bee63 DIFF: https://github.com/llvm/llvm-project/commit/6294325a535d8042a667ccfb4400a9f63e1bee63.

[clang] 05fb840 - [clang-format] Allow `Language: Cpp` for C files (#133033)

2025-03-27 Thread via cfe-commits
Author: Owen Pan Date: 2025-03-27T01:00:02-07:00 New Revision: 05fb8408de23c3ccb6125b6886742177755bd757 URL: https://github.com/llvm/llvm-project/commit/05fb8408de23c3ccb6125b6886742177755bd757 DIFF: https://github.com/llvm/llvm-project/commit/05fb8408de23c3ccb6125b6886742177755bd757.diff LOG:

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/14035 Here is the relevant p

[clang] [clang-format] Allow `Language: Cpp` for C files (PR #133033)

2025-03-27 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 05fb8408de23c3ccb6125b6886742177755bd757 https://github.com/llvm/llvm-project/pull/133033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-03-27 Thread Pengcheng Wang via cfe-commits
@@ -830,3 +830,16 @@ def : RISCVRegisterClass<[XLenVT], 32, (add SF_VCIX_STATE)> { let RegInfos = XLenRI; let isAllocatable = 0; } + +//===--===// +// XSfmmbase tiles +//===

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/13540 Here is the releva

[clang] [llvm] Revert "[MIPS] Define SubTargetFeature for i6500 cpu" (PR #133215)

2025-03-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro created https://github.com/llvm/llvm-project/pull/133215 Reverts llvm/llvm-project#132907 due to some test failures. >From 9c22bc410d3e157686ae5fd76f8c000e65949a9e Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Thu, 27 Mar 2025 09:04:45 +0100 Subject: [PATCH

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-27 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,233 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -DCIR_ONLY %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/7752 Here is the relevant pi

[clang] [clang-format] Allow `Language: Cpp` for C files (PR #133033)

2025-03-27 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#133216 https://github.com/llvm/llvm-project/pull/133033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread Younan Zhang via cfe-commits
@@ -19849,11 +19849,14 @@ static void DoMarkVarDeclReferenced( SemaRef.InstantiateVariableDefinition(PointOfInstantiation, Var); }); -// Re-set the member to trigger a recomputation of the dependence bits -// for the expression. -if (a

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] 58a0c95 - Revert "[MIPS] Define SubTargetFeature for i6500 cpu" (#133215)

2025-03-27 Thread via cfe-commits
Author: Djordje Todorovic Date: 2025-03-27T09:06:02+01:00 New Revision: 58a0c9570c69ecdf23e998637d2b82cfa455bf14 URL: https://github.com/llvm/llvm-project/commit/58a0c9570c69ecdf23e998637d2b82cfa455bf14 DIFF: https://github.com/llvm/llvm-project/commit/58a0c9570c69ecdf23e998637d2b82cfa455bf14.d

[clang] [llvm] Revert "[MIPS] Define SubTargetFeature for i6500 cpu" (PR #133215)

2025-03-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro closed https://github.com/llvm/llvm-project/pull/133215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-27 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 1/6] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #5981

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/133212 >From 34632d01840af89745dc79d27e06bd86aeb04c84 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 27 Mar 2025 13:58:36 +0800 Subject: [PATCH 1/2] [Clang] Correct the DeclRefExpr's Type after the initializer

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-27 Thread Carlos Alberto Enciso via cfe-commits
CarlosAlbertoEnciso wrote: @dwblaikie: > Not sure why it'd be necessary to make that vtable global variable "global" > rather than static within the class? Is that for debug_names lookup? (I think > static members are still in the index, right?) If it's a class member you can > still do bidir

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-27 Thread Paul Schwabauer via cfe-commits
koplas wrote: > LGTM, Thanks! Will you need me to merge that for you? Yes, I don't have any permissions to merge this. https://github.com/llvm/llvm-project/pull/133077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building `clang,llvm` at step 6 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/5698 Here is the releva

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/133205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread via cfe-commits
@@ -19849,11 +19849,14 @@ static void DoMarkVarDeclReferenced( SemaRef.InstantiateVariableDefinition(PointOfInstantiation, Var); }); -// Re-set the member to trigger a recomputation of the dependence bits -// for the expression. -if (a

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-27 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas updated https://github.com/llvm/llvm-project/pull/133077 >From 81df4736822848b35959aa067fc9d056ed868946 Mon Sep 17 00:00:00 2001 From: koplas Date: Thu, 27 Mar 2025 08:00:54 +0100 Subject: [PATCH] [PATCH] [clang][frontend] Fix serialization for CXXConstructorDecl (ref

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Martin Uecker via cfe-commits
uecker wrote: BTW: I did not push for this feature to be exposed in earlier language modes because GCC will ship with GNU C23 by default with GCC 15. GCC 15 already saw distribution-wide testing in Redhat and Debian and from this experience I do not expect any problems related to this featur

[clang-tools-extra] [llvm] [clang-doc] Adds a mustache backend (PR #133161)

2025-03-27 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/133161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From dfe49e826705a5e9371e17e66e40c31602beea8e Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/4] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-27 Thread Younan Zhang via cfe-commits
@@ -19849,11 +19849,14 @@ static void DoMarkVarDeclReferenced( SemaRef.InstantiateVariableDefinition(PointOfInstantiation, Var); }); -// Re-set the member to trigger a recomputation of the dependence bits -// for the expression. -if (a

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-msan` running on `sanitizer-buildbot9` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/5667 Here is the r

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/13692 Here is the relevant pie

[clang] [clang-format] Allow `Language: Cpp` for C files (PR #133033)

2025-03-27 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/133033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-27 Thread Morris Hafner via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[clang] [flang] [libcxx] [llvm] [llvm-reduce]: print short form, actionable names in the log (PR #132813)

2025-03-27 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,25 @@ +//===--- DeltaPass.h - Delta Pass Structure *- C++ -*-===// +// +// 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: Apach

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -fexperimental-new-constant-interpreter -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * +

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -fexperimental-new-constant-interpreter -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * +

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Devon Loehr (DKLoehr) Changes This turns on the unnecessary-virtual-specifier warning in genera, but disables it when building LLVM. It also tweaks the warning description to be slightly more accurate. Background: I've been working on cl

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread via cfe-commits
@@ -170,102 +132,112 @@ struct alignas(ConstraintAlignment) FoldExpandedConstraint { const Expr *Pattern) : Kind(K), Constraint(std::move(C)), Pattern(Pattern) {}; - template - bool subsumes(const FoldExpandedConstraint &Other, -

[clang] [AMDGPU] Remove detection of hip runtime for Spack (PR #133263)

2025-03-27 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > I'm going to wager that we can't just rip this out without the world > exploding, and these issues need to be addressed and not just drop the whole > thing. [haampie](https://github.com/haampie) is the maintainer of the HIP spack package. I assume it is safe to remove them b

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-27 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From bf3f06cc99a1ac2460ffea741c0fe495f0778e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/3] [AMDGPU] Add "lds-bu

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133125 >From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 26 Mar 2025 12:54:29 -0400 Subject: [PATCH 01/10] [C2y] Implement WG14 N3369 and N3469 (_Countof) C2y

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -fexperimental-new-constant-interpreter -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * +

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -fexperimental-new-constant-interpreter -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * +

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/132849 >From b5b5275093f6942238536834c6508551f7ceffd8 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 23:34:19 +0100 Subject: [PATCH 01/12] [Clang] Improve subsumption. The main goal of this patc

[clang] Fix complex long double division with -mno-x87. (PR #133152)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) Changes The combination of `-fcomplex-arithmetic=promoted` and `mno-x87` for `double` complex division is leading to a crash. See https://godbolt.org/z/189G957oY This patch fixes that. --- Full diff: https:/

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-27 Thread Martin Uecker via cfe-commits
uecker wrote: Another comment about attributes: Attributes should not generally affect type compatibility (in general, but also relevant for this feature) for two reasons: 1. Standard attributes are ignorable, and this would then break. 2. Compatibility affects aliasing, one one certainly does

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Joseph Huber via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-27 Thread Aaron Ballman via cfe-commits
@@ -170,102 +132,112 @@ struct alignas(ConstraintAlignment) FoldExpandedConstraint { const Expr *Pattern) : Kind(K), Constraint(std::move(C)), Pattern(Pattern) {}; - template - bool subsumes(const FoldExpandedConstraint &Other, -

[clang] [HIP] use offload wrapper for non-device-only non-rdc (PR #132869)

2025-03-27 Thread Yaxun Liu via cfe-commits
@@ -9348,11 +9348,22 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, // Add the linker arguments to be forwarded by the wrapper. CmdArgs.push_back(Args.MakeArgString(Twine("--linker-path=") + LinkCommand->getE

[clang] [HIP] use offload wrapper for non-device-only non-rdc (PR #132869)

2025-03-27 Thread Joseph Huber via cfe-commits
@@ -9348,11 +9348,22 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, // Add the linker arguments to be forwarded by the wrapper. CmdArgs.push_back(Args.MakeArgString(Twine("--linker-path=") + LinkCommand->getE

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add guard to for loop test clang/test/Sema/for.c (PR #133169)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. Ah, I didn’t think of that. Thanks! https://github.com/llvm/llvm-project/pull/133169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [HIP] use offload wrapper for non-device-only non-rdc (PR #132869)

2025-03-27 Thread Yaxun Liu via cfe-commits
@@ -4502,6 +4506,16 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, InputArg)) break; + // For HIP non-rdc non-device-only compilation, create a linker wrapper yxs

[clang] [flang] [libcxx] [llvm] [llvm-reduce]: print short form, actionable names in the log (PR #132813)

2025-03-27 Thread Mark de Wever via cfe-commits
@@ -39,8 +39,8 @@ void test() { (void)std::forward_like(i); // expected-error {{no matching function for call to 'forward_like'}} (void)std::forward_like(i); // expected-error {{no matching function for call to 'forward_like'}} - using fpr = void()&; - using fprr = v

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2025-03-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 3f3478d6708cbea9a68cac31d51e062bbe126ef8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Nov 2024 18:30:39 +0100 Subject: [PATCH] [libc++] Enable -Wmissing-prototypes --- libcxx/include/f

[clang] 4480f26 - Fix failing test case for _Countof

2025-03-27 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-27T14:07:57-04:00 New Revision: 4480f26e939304f5aa659b72fe16746dfe96601e URL: https://github.com/llvm/llvm-project/commit/4480f26e939304f5aa659b72fe16746dfe96601e DIFF: https://github.com/llvm/llvm-project/commit/4480f26e939304f5aa659b72fe16746dfe96601e.diff

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-27 Thread Andy Kaylor via cfe-commits
@@ -228,6 +257,42 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::FPAttr fltAttr) { loc, converter->convertType(fltAttr.getType()), fltAttr.getValue()); } +// ConstArrayAttr visitor +mlir::Value CIRAttrToValue::visitCirAttr(cir::ConstArrayAttr attr) { + mlir::Type llv

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide commented: Looks like you’ll have to update some tests because CI is failing (also, I’d be very surprised if we didn’t have tests for this). Also, this still needs a release note. Maybe a fix for the virtual anchor pattern would be to somehow not emit the warning f

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread Alejandro Colomar via cfe-commits
alejandro-colomar wrote: > > Thanks @AaronBallman !! I am still working on my patch, so just for > > learning about Clang internals, I'll try to finish mine, and compare it to > > yours. :-) > > Sorry for stealing this one out from under you! No problem. :-) > It turns out it was a bit more

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to check_clang_tidy (PR #133140)

2025-03-27 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/133140 >From 48bb3c79069c9bad5ee01865058a155368586b2e Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Thu, 27 Mar 2025 13:28:56 -0400 Subject: [PATCH] [NFC][clang-tidy] Add type annotations to check_clang_tidy

<    1   2   3   4   5   >