[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread Fangrui Song via cfe-commits
@@ -2,7 +2,7 @@ ! invocation. These libraries are added on top of other standard runtime ! libraries that the Clang driver will include. -! RUN: %flang -### --target=ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128NONE +! RUN: %f

[clang] Improve diagnostic wording for invalid callback attribute uses (PR #134423)

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

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-04 Thread Joseph Huber via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) + // SPIR-V globals s

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-04 Thread Eli Friedman via cfe-commits
@@ -793,6 +793,7 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary) { } CodeGenFunction(*this).GenerateCXXGlobalInitFunc(Fn, ModuleInits, GuardAddr); +getTargetCodeGenInfo().setTargetAttributes(nullptr,

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-04 Thread David Green via cfe-commits
davemgreen wrote: I was going to suggest in #130623 that we undid this part of the change and made it an NFC except for +[no]simd. But after looking at it this morning.. I wasn't sure. It at least it deserved to be its own change :) I believe that if it used `if (!ForAS || !Generic)` then it

[clang] 30f2e92 - [clang] [sanitizer] predict trap checks succeed (#134310)

2025-04-04 Thread via cfe-commits
Author: Florian Mayer Date: 2025-04-04T10:58:08-07:00 New Revision: 30f2e92c6968a1348a76e7ba169259bb345b784c URL: https://github.com/llvm/llvm-project/commit/30f2e92c6968a1348a76e7ba169259bb345b784c DIFF: https://github.com/llvm/llvm-project/commit/30f2e92c6968a1348a76e7ba169259bb345b784c.diff

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-04 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/134310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -193,8 +334,23 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { switch (op) { case UO_Deref: { -cgm.errorNYI(e->getSourceRange(), "UnaryOp dereference"); -return LValue(); +QualType t = e->getSubExpr()->getType()->getPointeeType(); +

[clang-tools-extra] [NFC] Remove dead code detected by code sanitizer. (PR #134385)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Zahira Ammarguellat (zahiraam) Changes The code sanitizer is failing with this error: `Execution cannot reach this statement.` The execution code path would early exit at line 928 if `(Lil && Ril) = true`. --- Full diff: http

[clang-tools-extra] [NFC] Remove dead code detected by code sanitizer. (PR #134385)

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

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

2025-04-04 Thread Theo de Magalhaes 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 Message-ID: In-Reply-To:

[clang] [libc] [clang] diagnose invalid member pointer class on instantiation (PR #132516)

2025-04-04 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > Why was this landed w/o any approvals? I am reading the PR and I see now this was a fix for something you just landed but that was not clear from the summary in the PR. https://github.com/llvm/llvm-project/pull/132516 ___ cfe-commits

[libclc] [libclc] Add missing license headers to source IR files (PR #132758)

2025-04-04 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/132758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-04 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/133747 >From 175e2531de9e2fceb72b25aed5073b225e2495ac Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 31 Mar 2025 16:35:03 + Subject: [PATCH 1/2] [clang] Implement CWG2611 CWG2611 "Missing parentheses in expan

[clang] [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (PR #134269)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yingwei Zheng (dtcxzyw) Changes This patch turns off inbounds/nuw flags for member accesses when `-fwrapv-pointer` is set. Note: There are many calls to `CGBuilderTy::CreateStructGEP`, and most of them are safe. So I think it is p

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-04 Thread Tom Eccles via cfe-commits
@@ -6961,6 +6960,52 @@ defm unsigned : OptInFC1FFlag<"unsigned", "Enables UNSIGNED type">; def fno_automatic : Flag<["-"], "fno-automatic">, Group, HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; +defm repack_arrays +

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

2025-04-04 Thread Younan Zhang via cfe-commits
@@ -10918,7 +11083,44 @@ bool OverloadCandidate::NotValidBecauseConstraintExprHasError() const { OverloadingResult OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, iterator &Best) { + + bool TwoPhaseResolution = +

[clang] [clang-tools-extra] [llvm] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2025-04-04 Thread Dmitry Sidorov via cfe-commits
MrSidims wrote: Hi @ZijunZhaoCCK , sorry, I'm quite late for the party, but may I ask you some questions? We want to be able to distinguish between Vulkan and OpenCL environments in [SPIR-V backend](https://github.com/intel/llvm/tree/sycl/llvm/lib/Target/SPIRV), so we could be able to pick b

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

2025-04-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: I think this should be more specific on what `-ffreestanding` actually does. Namely, removed implicit search paths, link libraries, passes `-fno-builtin` and lets `int main` function as a normal function. For the `libc` side, I don't think this makes much

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread Slava Zakharin via cfe-commits
vzakhari wrote: Can you please explain why you want to link the static library by default? For example, Clang has these options https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-static-libgcc that allow users to force the static linking, and, I think, by default it l

[clang] [Clang] Always verify LLVM IR inputs (PR #134396)

2025-04-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/134396 >From 194ce2dfa10eebc3c0d45f944a09473bd88412d9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 4 Apr 2025 16:57:30 +0200 Subject: [PATCH 1/2] [Clang] Always verify LLVM IR inputs We get a lot of issues tha

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `cross-project-tests-sie-ubuntu-dwarf5` running on `doug-worker-1b` while building `clang-tools-extra,clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/163/builds/15

[clang] [Lex][Clang] Add checking to HeaderMapImpl::getString to make it more robust (PR #131677)

2025-04-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/131677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Check record base classes for valid structs (PR #132270)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -7385,8 +7385,13 @@ class APValueToBufferConverter { for (size_t I = 0, E = CXXRD->getNumBases(); I != E; ++I) { const CXXBaseSpecifier &BS = CXXRD->bases_begin()[I]; CXXRecordDecl *BaseDecl = BS.getType()->getAsCXXRecordDecl(); +const APValue &

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-04-04 Thread Matheus Izvekov via cfe-commits
@@ -1650,6 +1665,23 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +std::optional ComputeSizeOfPackExprWithoutSubstitution( +ArrayRef PackArgs) { + // Don't do this when rewriting template parameters for CTAD: +

[clang] [NFC] Add a leading comment to boolean arguments. (PR #131746)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Park (mpark) Changes Addressing [nit comments](https://github.com/llvm/llvm-project/pull/129982#discussion_r1997914387) from @shafik --- Full diff: https://github.com/llvm/llvm-project/pull/131746.diff 2 Files Affected: - (mod

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-04 Thread Alex Voicu via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) AlexVlx w

[clang] [Clang] Fix unnecessary extra return block emmited during function epilog after musttail call (PR #134282)

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

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-04-04 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/132919 >From 7905577616743f5158560a4b337148ef9cd25f1e Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Tue, 25 Mar 2025 14:50:55 +0200 Subject: [PATCH 1/7] [Clang] Implement CWG2517 Useless restriction on use of parameter

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-04 Thread Victor Lomuller via cfe-commits
@@ -0,0 +1,131 @@ +//===--- SYCL.h -*- 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: Ap

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-04 Thread Vlad Serebrennikov via cfe-commits
@@ -444,6 +444,7 @@ Python Binding Changes -- - Added ``Type.get_methods``, a binding for ``clang_visitCXXMethods``, which allows visiting the methods of a class. +- Add equality comparison operators for ``File`` type Endilll wrote: ```su

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

2025-04-04 Thread Oliver Hunt via cfe-commits
@@ -17389,6 +17389,19 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, Previous.clear(); } + // I think DC check should be DC->isStdNamespace()? ojhunt wrote: @erichkeane so I think this was a case where the test can

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -569,6 +569,36 @@ def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator, ]; } +//===--===// +// BreakOp +//===--===// + +def BreakOp : C

[clang] [HLSL] Add support for SV_GroupIndex in SPIR-V (PR #130672)

2025-04-04 Thread via cfe-commits
github-actions[bot] wrote: @cassiebeckley 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

[libclc] libclc: erfc: fix fp32 implementation (PR #132390)

2025-04-04 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM. It might be worth re-titling the PR to mention FTZ mode? https://github.com/llvm/llvm-project/pull/132390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/134430 None >From 951dc421024f0a5fe7148734eb6efe8d457bc4f6 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Apr 2025 14:31:54 -0400 Subject: [PATCH] [PowerPC] Update altivec.h to use __inline__ for c89 compatibil

[clang-tools-extra] [clang-tidy] Improve `bugprone-capturing-this-in-member-variable` check: add support of `bind` functions. (PR #132635)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes Improve `bugprone-capturing-this-in-member-variable` check: Added support of `bind`-like functions that capture and store `this` pointer in class member. Closes https://github.com/llvm/llvm-pr

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-04-04 Thread Jonathan Thackray via cfe-commits
@@ -0,0 +1,105 @@ +//===-- CGBuiltin.h - Emit LLVM Code for builtins -===// +// +// 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] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132294)

2025-04-04 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/132294 -Optimized addModuleFiles functions for both CompilerInvocation and CowCompilerInvocation to reduce redundant function calls and improve efficiency -Introduced memory preallocation using reserve() when

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

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

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-04 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObject (PR #132427)

2025-04-04 Thread Balazs Benics via cfe-commits
steakhal wrote: We only accept patches with regressions tests, that ensure that in the future we never accidentally break one thing we had broken in the past. This ensures we are heading in the right direction. Here are two examples I grabbed from the history of this particular checker: - ht

[clang] [Clang] Always verify LLVM IR inputs (PR #134396)

2025-04-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/134396 We get a lot of issues that basically boil down to "I passed malformed LLVM IR to clang and it crashed". Clang does not perform IR verification by default in (non-assertion-enabled) release builds, and that's sen

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (PR #132184)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-debian-cpp20` running on `clang-debian-cpp20` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/108/builds/10717 Here is the relevant p

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Lei Huang (lei137) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/134430.diff 2 Files Affected: - (modified) clang/lib/Headers/altivec.h (+46-46) - (modified) clang/test/Headers/altivec-header.c (+1) ```

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -25,6 +25,147 @@ using namespace clang; using namespace clang::CIRGen; using namespace cir; +/// Given an expression of pointer type, try to +/// derive a more accurate bound on the alignment of the pointer. +Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr

[clang] [clang] Fix crash on invalid `std::initializer_list` template-id (PR #132284)

2025-04-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt requested changes to this pull request. https://github.com/llvm/llvm-project/pull/132284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -25,6 +25,147 @@ using namespace clang; using namespace clang::CIRGen; using namespace cir; +/// Given an expression of pointer type, try to +/// derive a more accurate bound on the alignment of the pointer. +Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-04 Thread Alex Voicu via cfe-commits
@@ -5402,6 +5407,10 @@ LangAS CodeGenModule::GetGlobalConstantAddressSpace() const { // UniformConstant storage class is not viable as pointers to it may not be // casted to Generic pointers which are used to model HIP's "flat" pointers. return LangAS::cuda_device

[clang] [llvm] Hlsl asuint16 function (PR #132315)

2025-04-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/132315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 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 HEAD~1 HEAD --extensions h,c -- clang/lib/Headers/altivec.h clang/test/Headers/altive

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

2025-04-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after other reviews are applied. https://github.com/llvm/llvm-project/pull/134181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-04-04 Thread Ivana Ivanovska via cfe-commits
https://github.com/ivanaivanovska closed https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-04-04 Thread Eugene Shalygin via cfe-commits
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/131605 >From 5a1ed72f4be5ddd426a03ce1d1fb9cefc233942a Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 17 Mar 2025 11:23:35 +0100 Subject: [PATCH] [clang-format] option to control bin-packing keyworded paramete

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-04-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `misc-`, `cppcore-` and other checks (PR #133694)

2025-04-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: Could anyone merge this please? Thank you Hopefully default values of all check will be fixed with this commit:) https://github.com/llvm/llvm-project/pull/133694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang][Driver] Override complex number calculation method by -fno-fa… (PR #132680)

2025-04-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/132680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-04-04 Thread Baranov Victor via cfe-commits
@@ -1289,7 +1305,11 @@ void testBracedInitTemporaries() { v2.push_back(NonTrivialWithVector{{0}}); v2.push_back({{0}}); v2.push_back(NonTrivialWithVector{std::vector{0}}); + // CHECK-MESSAGES-CPP20: :[[@LINE-1]]:6: warning: use emplace_back instead of push_back

[clang-tools-extra] [clang-tidy] Fix false positives in `bugprone-crtp-constructor-accessibility` check (PR #132543)

2025-04-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/132543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-04-04 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/133310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-04-04 Thread Owen Pan via cfe-commits
owenca wrote: > @owenca, just to confirm - you are suggesting to add `Custom` string to > `AllowShortFunctionsOnASingleLine` and new parameter > (`AllowShortFunctionsOnASingleLineOptions` for example) which will control > behavior if `AllowShortFunctionsOnASingleLine == Custom`? Yep. > What

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -569,6 +569,36 @@ def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator, ]; } +//===--===// +// BreakOp +//===--===// + +def BreakOp : C

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast approved this pull request. LGTM with a suggestion. https://github.com/llvm/llvm-project/pull/134430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Hubert Tong via cfe-commits
@@ -1,6 +1,7 @@ // RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-feature +altivec -ffreestanding -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-feature +altivec -ffreestanding -emit-llvm -flax-vector-conversions=none

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/134430 >From 951dc421024f0a5fe7148734eb6efe8d457bc4f6 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Apr 2025 14:31:54 -0400 Subject: [PATCH 1/2] [PowerPC] Update altivec.h to use __inline__ for c89 compatibilit

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/134430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Implement `print-deserialized-declarations` flag to dump source… (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -7968,6 +7968,10 @@ def print_dependency_directives_minimized_source : Flag<["-"], "print-dependency-directives-minimized-source">, HelpText<"Print the output of the dependency directives source minimizer">; } +def print_deserialized_declarations : Joined<["-"], + "pri

[clang] [llvm] Define pointer layout for AVR program address space (PR #134254)

2025-04-04 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] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] Fix typos: paramter, parametr, parametere (PR #134092)

2025-04-04 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/134092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM]Ensure both -mno-unaligned-access and -munaligned-access are passed to multilib selection logic (PR #134099)

2025-04-04 Thread Peter Smith via cfe-commits
@@ -239,12 +239,10 @@ static void getAArch64MultilibFlags(const Driver &D, Result.push_back(BranchProtectionArg->getAsString(Args)); } - if (Arg *AlignArg = Args.getLastArg( - options::OPT_mstrict_align, options::OPT_mno_strict_align, - options::OPT_mn

[clang] [clang-tools-extra] [clang] Do not share ownership of `PreprocessorOptions` (PR #133467)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang-tools-extra,clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/buil

[clang] [llvm] Add clang driver changes to support MTI RISC-V (PR #134065)

2025-04-04 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro updated https://github.com/llvm/llvm-project/pull/134065 >From 513b1ae05ed6049586a23acab6c0a2f7dbb48454 Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Wed, 26 Mar 2025 09:24:29 +0100 Subject: [PATCH 1/2] [clang][RISCV] Set default CPU for vendor --- clang/

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 1/9] Implement a dst function with test cases for HLSL

[clang] 9e5bfbf - [EquivalenceClasses] Update member_begin to take ECValue (NFC).

2025-04-04 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2025-04-01T09:28:46+01:00 New Revision: 9e5bfbf77db0945f59c0d18012a8e6d43c711b3a URL: https://github.com/llvm/llvm-project/commit/9e5bfbf77db0945f59c0d18012a8e6d43c711b3a DIFF: https://github.com/llvm/llvm-project/commit/9e5bfbf77db0945f59c0d18012a8e6d43c711b3a.diff

[clang-tools-extra] [llvm] [llvm] add tool to verify mustache library (PR #111487)

2025-04-04 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD llvm/docs/conf.py `` View the diff from darker here. `

[clang] c5b3fe2 - [clang] Automatically add the `returns_twice` attribute to certain functions even if `-fno-builtin` is set (#133511)

2025-04-04 Thread via cfe-commits
Author: Alan Zhao Date: 2025-03-31T09:42:34-07:00 New Revision: c5b3fe209408c89c1ca21f103a8fd45fb48c3138 URL: https://github.com/llvm/llvm-project/commit/c5b3fe209408c89c1ca21f103a8fd45fb48c3138 DIFF: https://github.com/llvm/llvm-project/commit/c5b3fe209408c89c1ca21f103a8fd45fb48c3138.diff LOG

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-04 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,15 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 \ +// RUN: -emit-llvm -o - | FileCheck %s + +// CHECK-LABEL: @test_builtin_amdgcn_cvt_off_f32_i4( +// CHECK-NEXT:

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-04-04 Thread Vassil Vassilev via cfe-commits
@@ -14,4 +15,13 @@ auto r2 = l2(); auto r3 = l2(); // CHECK: TWO -%quit +// Verify non-local lambda capture error is correctly reported +int x = 42; + +// expected-error {{non-local lambda expression cannot have a capture-default}} +auto capture = [&]() { return x * 2; }; + --

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: David Truby (DavidTruby) Changes This fixes an issue where, since the alignment of the -x lanaguage modes, .f90 files were being preprocessed by default. This patch completes the alignment of the meaning of the f95-pp-input and f95 l

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-04-04 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,1059 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 wangpc-pp wrote: Precommit this test. https://github.com/llvm/llvm-project/pull/131781 ___ cfe-commit

[clang] [CLANG-CL] ignores wpadded (PR #130182)

2025-04-04 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 Message-ID: In-Reply-To: https://github.c

[clang-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes Split from https://github.com/llvm/llvm-project/pull/133161 refactor the code to extract file helpers used in HTML generators for use in other generators for clang-doc --- Full diff: https://github.c

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s metkarpoonam wrote: I removed the -O1 flag and added codegen with disable-llvm-pass. https://g

[clang] 50f0b30 - [Clang] [Sema] Allow static assertions in the first part of a `for` loop in C (#134415)

2025-04-04 Thread via cfe-commits
Author: Sirraide Date: 2025-04-04T20:54:13+02:00 New Revision: 50f0b30cffa72129a3179bd9ac83692114f6b19f URL: https://github.com/llvm/llvm-project/commit/50f0b30cffa72129a3179bd9ac83692114f6b19f DIFF: https://github.com/llvm/llvm-project/commit/50f0b30cffa72129a3179bd9ac83692114f6b19f.diff LOG:

[clang] [Clang] [Sema] Allow static assertions in the first part of a `for` loop in C (PR #134415)

2025-04-04 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/134415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-04 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > The ubsan handler cannot be eliminated because inaccessiblemem: readwrite > indicates that it has externally observable side effects. That is not how things work. For example: ``` $ echo "declare void @g() define void @f() nounwind { call void @g() memory(argmem: read,

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/134434 When coroutines are used w/ both -ffat-lto-objects and -flto=thin, the coroutine passes are not added to the optimization pipelines. Instead, just use the default ThinLTO pipeline to generate the ELF. Fixes #134

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#134434** https://app.graphite.dev/github/pr/llvm/llvm-project/134434?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/1344

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Zahira Ammarguellat (zahiraam) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/134138.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/NarrowingConversionsCheck.cpp (+1-1) - (modi

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
@@ -978,6 +979,28 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // we break out of the loop. for (; s != ThisTokEnd; ++s) { switch (*s) { +case 'b': +case 'B': + if (!isFPConstant) +break; // Error for integer constant. +

[clang] [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (PR #133755)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Prior to this PR, we were emitting warnings for Objective-C ivars and properties if the forward declaration of the type appeared first in a non-system header. This PR fixes the checker so tha we'd ignore ivars

[clang] [alpha.webkit.ForwardDeclChecker] Ignore forward declared struct. (PR #133804)

2025-04-04 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/133804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,flang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/7860 Here is the

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-04 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/134430 >From 951dc421024f0a5fe7148734eb6efe8d457bc4f6 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 4 Apr 2025 14:31:54 -0400 Subject: [PATCH 1/3] [PowerPC] Update altivec.h to use __inline__ for c89 compatibilit

[clang] [Format] Do not crash on non-null terminated strings (PR #131299)

2025-04-04 Thread Björn Schäpers via cfe-commits
@@ -2031,6 +2031,7 @@ class SourceManagerForFile { // The order of these fields are important - they should be in the same order // as they are created in `createSourceManagerForFile` so that they can be // deleted in the reverse order as they are created. + std::string

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-04-04 Thread via cfe-commits
@@ -9920,7 +9920,9 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (auto *AliasTemplate = dyn_cast_or_null( TemplateName.getAsTemplateDecl())) { Diag(Kind.getLocation(), - diag::warn_cxx17_compat_ctad_for_alias_templates); +

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (sstwcw) Changes Formatting this piece of code made the program crash. ``` class TypedVecListRegOperand : RegisterOperand

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-04-04 Thread via cfe-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/121199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   9   >