[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/97121 >From 87aa01b96f46d5de40f5b0c3c3a95a4912edfde7 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Tue, 24 Sep 2024 10:22:51 -0700 Subject: [PATCH] Zero init unspecified fields in initializers in C (#97459) hen an ini

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-24 Thread via cfe-commits
eddyz87 wrote: @peilin-ye , > Got it, rebased and added a 4th commit (can't say I like the > one-commit-per-PR policy either :-) to do this in v3. Please take another > look. lgtm, but please note CI failure: ``` _bk;t=1727211158841FAIL: LLVM :: CodeGen/BPF/acquire-release.ll (11379 of 55

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-24 Thread via cfe-commits
https://github.com/eddyz87 approved this pull request. https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 Thread via cfe-commits
https://github.com/yabinc reopened https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/109088 >From 255c4af822ea327b51547c5c666b172bb81c6454 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Wed, 18 Sep 2024 13:58:24 +0800 Subject: [PATCH 1/2] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` --

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/104741 >From e2ce302a0d3649594ff1a6b94420f815d0e1acde Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 19 Aug 2024 15:22:39 +0800 Subject: [PATCH 1/2] [UBSan] Diagnose assumption violation --- clang/lib/Cod

[clang] 4c4fb6a - [BPF] Do atomic_fetch_*() pattern matching with memory ordering (#107343)

2024-09-24 Thread via cfe-commits
Author: yonghong-song Date: 2024-09-24T15:55:50-07:00 New Revision: 4c4fb6ada7a168e5129a22efb4d604bb6fc60b17 URL: https://github.com/llvm/llvm-project/commit/4c4fb6ada7a168e5129a22efb4d604bb6fc60b17 DIFF: https://github.com/llvm/llvm-project/commit/4c4fb6ada7a168e5129a22efb4d604bb6fc60b17.diff

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-24 Thread Vitaly Buka via cfe-commits
@@ -633,9 +633,11 @@ static void handleInvalidBuiltin(InvalidBuiltinData *Data, ReportOptions Opts) { ScopedReport R(Opts, Loc, ET); - Diag(Loc, DL_Error, ET, - "passing zero to %0, which is not a valid argument") -<< ((Data->Kind == BCK_CTZPassedZero) ? "ctz()"

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-24 Thread Vitaly Buka via cfe-commits
@@ -1996,16 +1996,21 @@ struct CallObjCArcUse final : EHScopeStack::Cleanup { Value *CodeGenFunction::EmitCheckedArgForBuiltin(const Expr *E, vitalybuka wrote: Done https://github.com/llvm/llvm-project/pull/104741 _

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-24 Thread via cfe-commits
https://github.com/yonghong-song closed https://github.com/llvm/llvm-project/pull/107343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4a9da96 - [clang] Add cc1 --output-asm-variant= to set output syntax

2024-09-24 Thread via cfe-commits
Author: Fangrui Song Date: 2024-09-24T15:59:33-07:00 New Revision: 4a9da96dc68d878893399210888a03117b39b802 URL: https://github.com/llvm/llvm-project/commit/4a9da96dc68d878893399210888a03117b39b802 DIFF: https://github.com/llvm/llvm-project/commit/4a9da96dc68d878893399210888a03117b39b802.diff

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/109360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: clang with UBSAN is fine, i am running other tests. https://github.com/llvm/llvm-project/pull/104741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

2024-09-24 Thread via cfe-commits
@@ -9509,6 +9509,19 @@ Sema::ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, PushDeclContext(BodyScope, Body); for (ParmVarDecl *Param : LocalParameters) { +if (Param->getType()->isVoidType()) { + if (LocalParameters.size() > 1) { +Diag(Param->getBeg

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-09-24 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/101450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-09-24 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,38 @@ +#ifndef LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_NULLABLEVALUE_H_ +#define LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_NULLABLEVALUE_H_ + +#include "bsl_optional.h" + +/// Mock of `bdbl::NullableValue`. -

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-09-24 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. LGTM. Rebase to fix release notes conflict and I'll merge 👍 https://github.com/llvm/llvm-project/pull/101450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 Thread via cfe-commits
yabinc wrote: I manually squashed all the commits. Because there is a merge conflict when I was trying git merge --squash locally. https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
@@ -0,0 +1,79 @@ +// DirectX target: +// +// -- Native Half support test --- +// +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileC

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
@@ -0,0 +1,38 @@ + +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_too_few_arg() { lizhengxing wrote: Done. Add 2 doub

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Zhengxing li via cfe-commits
lizhengxing wrote: > We should announce `__builtin_elementwise_fmod` here: > `clang/docs/ReleaseNotes.rst` See @spall PR where we just did this: > https://github.com/llvm/llvm-project/pull/108121/files Done. https://github.com/llvm/llvm-project/pull/108849

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-24 Thread Wentao Zhang via cfe-commits
whentojump wrote: > Hello, > > I noticed that before this patch `clang empty.c -fsanitize=undefined > -ffine-grained-bitfield-accesses -c -Werror` (on empty file empty.c) resulted > in `warning: option '-ffine-grained-bitfield-accesses' cannot be enabled > together with a sanitizer; flag igno

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 Thread via cfe-commits
yabinc wrote: > but maybe helpful if you can show Linux kernel codesize as a reference, to > show there aren't massive issues. I tested it on android-mainline, which closely follows linux upstream. The size change is very small. .text 0x1139000 -> 0x1138000 .init.text 0x061f08 -> 0x062050 .dat

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/109088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/109088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 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 7046a9fb05f65f4699a2e88abbcb7dad8a21db2d c66becf3c8e1782a7cc3ee5848d259dde6d789d0 --e

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. Sorry, I realized the my request does not make much sense. Still PR contain message improvement and a bug fix. LGTM. https://github.com/llvm/llvm-project/pull/109088 ___ cfe-commits mailing li

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/109088 >From 255c4af822ea327b51547c5c666b172bb81c6454 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Wed, 18 Sep 2024 13:58:24 +0800 Subject: [PATCH 1/3] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` --

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-24 Thread Peilin Ye via cfe-commits
peilin-ye wrote: > lgtm, but please note CI failure: Oops, I'll take a closer look later. Thanks! https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-09-24 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/101450 >From f7e7681db6ad83878fd00cf250047c98b1b4f051 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Tue, 23 Jul 2024 10:30:54 -0400 Subject: [PATCH 1/4] [clang-tidy] Add support for bsl::optional --- clang-tools-

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-09-24 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/101450 >From f7e7681db6ad83878fd00cf250047c98b1b4f051 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Tue, 23 Jul 2024 10:30:54 -0400 Subject: [PATCH 1/3] [clang-tidy] Add support for bsl::optional --- clang-tools-

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/109882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm +// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fprebuilt-module-path=%t -emit-module-interface -o %t/B.pcm +// RUN: %clang

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Chuanqi Xu via cfe-commits
@@ -115,7 +115,7 @@ C++ Language Changes - Allow single element access of GCC vector/ext_vector_type object to be constant expression. Supports the `V.xyzw` syntax and other tidbits as seen in OpenCL. Selecting multiple elements is left as a future work. -- Implement `CWG18

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
@@ -2994,6 +2994,29 @@ A "convergencectrl" operand bundle is only valid on a ``convergent`` operation. When present, the operand bundle must contain exactly one value of token type. See the :doc:`ConvergentOperations` document for details. +.. _ob_fpe: + +Floating-point Envir

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: I don't think attaching these operand bundles to the existing set of intrinsics is what we want to do. I'd prefer to deprecate the existing intrinsics and define some new scheme that uses these bundles on intrinsics that may be used in other ways. One

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
@@ -43,6 +43,15 @@ enum ExceptionBehavior : uint8_t { } +inline bool isValidExceptionBehavior(unsigned X) { andykaylor wrote: Do you know why the exception behaviors aren't handled in FloatingPointMode.h? https://github.com/llvm/llvm-project/pull/109798 ___

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
@@ -2994,6 +2994,29 @@ A "convergencectrl" operand bundle is only valid on a ``convergent`` operation. When present, the operand bundle must contain exactly one value of token type. See the :doc:`ConvergentOperations` document for details. +.. _ob_fpe: + +Floating-point Envir

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
@@ -47,6 +47,15 @@ enum class RoundingMode : int8_t { Invalid = -1///< Denotes invalid value. }; +inline bool isValidRoundingMode(int X) { + return X >= 0 && X <= static_cast(RoundingMode::Dynamic); andykaylor wrote: This isn't a sufficient check. For

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/109798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -2808,27 +2825,63 @@ void ExprEngine::processBranch(const Stmt *Condition, std::tie(StTrue, StFalse) = *KnownCondValueAssumption; else { assert(!isa(Condition)); + // TODO: instead of this shortcut perha

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-24 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -212,6 +212,25 @@ typedef llvm::ImmutableMap REGISTER_TRAIT_WITH_PROGRAMSTATE(PendingArrayDestruction, PendingArrayDestructionMap) +// This trait is used to heuristically filter out results

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-24 Thread Andy Kaylor via cfe-commits
@@ -357,6 +357,9 @@ class IRBuilderBase { void setConstrainedFPCallAttr(CallBase *I) { I->addFnAttr(Attribute::StrictFP); +MemoryEffects ME = MemoryEffects::inaccessibleMemOnly(); andykaylor wrote: I think all of the constrained intrinsics currently

[clang] [clang][bytecode] Handle vector comma op (PR #109827)

2024-09-24 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/109827 >From fcd804f4ae81b17d0afe94940042deb8a1568197 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 25 Sep 2024 07:44:40 +0800 Subject: [PATCH] [clang][bytecode] Handle vector comma op in common way Signed-off-b

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/106429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Handle vector comma op (PR #109827)

2024-09-24 Thread via cfe-commits
yronglin wrote: > One of the test failures is related to this change. Fixed https://github.com/llvm/llvm-project/pull/109827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Enable f16 vget/vset/vcreate/vlmul_ext/vlmul_trunc/vundefined intrinsics with Zvfhmin. (PR #109889)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes These intrinsics don't produce any instructions so don't require Zvfh. This makes Zvfhmin consistent with Zvfbfmin. See also https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/351 --- Full diff: http

[clang] [RISCV] Enable f16 vget/vset/vcreate/vlmul_ext/vlmul_trunc/vundefined intrinsics with Zvfhmin. (PR #109889)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Craig Topper (topperc) Changes These intrinsics don't produce any instructions so don't require Zvfh. This makes Zvfhmin consistent with Zvfbfmin. See also https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/351 --- Full d

[clang] [RISCV] Enable f16 vget/vset/vcreate/vlmul_ext/vlmul_trunc/vundefined intrinsics with Zvfhmin. (PR #109889)

2024-09-24 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/109889 These intrinsics don't produce any instructions so don't require Zvfh. This makes Zvfhmin consistent with Zvfbfmin. See also https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/351 >From 810444f5601e1f3c

[clang] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-24 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/108849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7a086e1 - [clang][CodeGen] Zero init unspecified fields in initializers in C (#97121)

2024-09-24 Thread via cfe-commits
Author: yabinc Date: 2024-09-24T19:06:20-07:00 New Revision: 7a086e1b2dc05f54afae3591614feede727601fa URL: https://github.com/llvm/llvm-project/commit/7a086e1b2dc05f54afae3591614feede727601fa DIFF: https://github.com/llvm/llvm-project/commit/7a086e1b2dc05f54afae3591614feede727601fa.diff LOG: [

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 Thread via cfe-commits
https://github.com/yabinc closed https://github.com/llvm/llvm-project/pull/97121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/109882 >From b1a659af4fccba0f7511ab52f0932d5a32958eb7 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 24 Sep 2024 20:02:05 -0300 Subject: [PATCH 1/2] [clang] fix assert in ADL finding entity in the implicit

[clang] 0a42c7c - [clang] fix assert in ADL finding entity in the implicit global module (#109882)

2024-09-24 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-09-24T22:57:07-03:00 New Revision: 0a42c7c6679bcc6f7be4b3d103670197acac96a9 URL: https://github.com/llvm/llvm-project/commit/0a42c7c6679bcc6f7be4b3d103670197acac96a9 DIFF: https://github.com/llvm/llvm-project/commit/0a42c7c6679bcc6f7be4b3d103670197acac96a9.dif

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/109882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy closed https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: Replaced by #109817 https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix assert in ADL finding entity in the implicit global module (PR #109882)

2024-09-24 Thread Matheus Izvekov via cfe-commits
@@ -115,7 +115,7 @@ C++ Language Changes - Allow single element access of GCC vector/ext_vector_type object to be constant expression. Supports the `V.xyzw` syntax and other tidbits as seen in OpenCL. Selecting multiple elements is left as a future work. -- Implement `CWG18

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 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` at step 13 "test-suite". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/4196 Here is the relevant piece

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv7-lnt` running on `linaro-clang-armv7-lnt` while building `clang` at step 12 "test-suite". Full details are available at: https://lab.llvm.org/buildbot/#/builders/77/builds/3721 Here is the relevant piece of the bu

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-24 Thread Alex Voicu via cfe-commits
AlexVlx wrote: I've created for the (potential) Translator work. https://github.com/llvm/llvm-project/pull/106429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-24 Thread Erich Keane via cfe-commits
erichkeane wrote: I agree I think with your take on temp.expl.spec, we run into this in quite a few places. I'd like to hear from the others, but this is a paragraph I've used in the past to justify a lot of this sort of diagnostics. https://github.com/llvm/llvm-project/pull/106585 __

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/109796 >From 89ff568fda0062a89ed690cdb0267fc41a89325c Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Tue, 24 Sep 2024 13:05:39 +0100 Subject: [PATCH 1/2] [PS4,PS5][Driver] Pass `-L<...>/target/lib -L.` to link

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-24 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Instead of the loop widening plans that I discussed earlier (e.g. on discourse) I ended up implementing this suppression heuristic, which is currently in a "minimal stable product" state: it is working and ready to be merged IMO, but I'm also open to suggestions about technica

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-24 Thread via cfe-commits
@@ -0,0 +1,186 @@ +; RUN: llc -march=bpfel -mcpu=v3 -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s +; RUN: llc -march=bpfeb -mcpu=v3 -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s +; +; Source: +; #include +; struct gstruct_t { +; _Atomic int a;

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-24 Thread via cfe-commits
@@ -35,6 +35,15 @@ static const char *BTFKindStr[] = { #include "llvm/DebugInfo/BTF/BTF.def" }; +static const DIType *tryRemoveAtomicType(const DIType *Ty) { yonghong-song wrote: Good point. I probably missed this case. Let me fix it. https://github.com/llvm

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Evan Wilde via cfe-commits
etcwilde wrote: This drops the dependency edge between the compile step and generating `GenVT.inc` though. There was already a (indirect) dependency between the link step of `clangCodeGen` and generating `GetnVT.inc`. Perhaps LLVM should export `vt_gen` like it does `intrinsics_gen` so that st

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Saleem Abdulrasool via cfe-commits
@@ -31,6 +31,7 @@ set(LLVM_LINK_COMPONENTS Target TargetParser TransformUtils + CodeGenTypes compnerd wrote: This is duplicated (L6). https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing l

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/109601 >From b97cb5af6dbf92edeeceedac38d0b657e3856fbe Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 22 Sep 2024 21:02:12 -0700 Subject: [PATCH] [Clang] Replace vt_gen with LLVMCodeGenTypes --- clang/

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Saleem Abdulrasool via cfe-commits
@@ -31,6 +31,7 @@ set(LLVM_LINK_COMPONENTS Target TargetParser TransformUtils + LLVMCodeGenTypes compnerd wrote: These are lexicographically sorted, please maintain that invariant. https://github.com/llvm/llvm-project/pull/109601 __

[clang] [Clang] Replace vt_gen with LLVMCodeGenTypes (PR #109601)

2024-09-24 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: You're welcome, though it looks like CI is borked. ``` ld.lld: error: unable to find library -lLLVMLLVMCodeGenTypes clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` I've changed it from `LLVMCodeGenTypes` to `CodeGenTypes` so hopefully CI

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-09-24 Thread Paul Walker via cfe-commits
@@ -2986,6 +2986,14 @@ void CastOperation::CheckCStyleCast() { return; } + if ((DestType->isArmMFloat8Type() && !SrcType->isArmMFloat8Type()) || + (!DestType->isArmMFloat8Type() && SrcType->isArmMFloat8Type())) { paulwalker-arm wrote: `DestType->i

[clang] fda0143 - [Rewrite] Use SmallSetVector (NFC) (#109746)

2024-09-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-24T08:33:24-07:00 New Revision: fda01437af339c87ecd226596dd1b5f6d2c6cbfa URL: https://github.com/llvm/llvm-project/commit/fda01437af339c87ecd226596dd1b5f6d2c6cbfa DIFF: https://github.com/llvm/llvm-project/commit/fda01437af339c87ecd226596dd1b5f6d2c6cbfa.diff L

[clang] [Rewrite] Use SmallSetVector (NFC) (PR #109746)

2024-09-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/109746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix vector shifts on big-endian systems (PR #109800)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109800 For shifts, the LHS and RHS element types might be different. The variable naming here could probably use some love now, but I'm trying to fix this as fast as possible. See the discussion in https://github.co

[clang] [clang][bytecode] Fix vector shifts on big-endian systems (PR #109800)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes For shifts, the LHS and RHS element types might be different. The variable naming here could probably use some love now, but I'm trying to fix this as fast as possible. See the discussion in https://github.

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-24 Thread via cfe-commits
@@ -1802,9 +1854,29 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) { if (Def->isFlagSet(IsStreamingFlag)) StreamingMap["ArmStreaming"].insert(Def->getMangledName()); -else if (Def->isFlagSet(VerifyRuntimeMode)) +else if (Def->isFlag

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-24 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Thank you ever so much for the review @VyacheslavLevytskyy! I will create a PR for the Translator as well, since there's some handling missing there; I will refer to it here for future readers. Final check: are you OK with the OpenCL changes @yxsamliu? https://github.com/llvm/l

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -86,6 +127,21 @@ Options this option enables. Default is `true`. +.. _option-ReportDefaultFunctions: + +.. option:: ReportDefaultFunctions + +When `true`, the check reports the default set of functions. +Copnsider changing the setting to false if you only want

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -86,6 +127,21 @@ Options this option enables. Default is `true`. +.. _option-ReportDefaultFunctions: + whisperity wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/106350 ___ cfe-commits m

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -74,10 +75,50 @@ Both macros have to be defined to suggest replacement functions from *Annex K.* ``__STDC_WANT_LIB_EXT1__`` must be defined to ``1`` by the user **before** including any system headers. +.. _CustomFunctions: + +Custom functions + + +The opti

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -45,8 +47,7 @@ The following functions are always checked, regardless of *Annex K* availability - ``rewind``, suggested replacement: ``fseek`` - ``setbuf``, suggested replacement: ``setvbuf`` -If `ReportMoreUnsafeFunctions -`_ is enabled, +If :ref:`ReportMoreUnsafeFuncti

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
https://github.com/whisperity approved this pull request. https://github.com/llvm/llvm-project/pull/106350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -104,6 +104,10 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:`bugprone-unsafe-functions + ` check to allow specifying + custom matched functions as well. whisperity wrote: ```suggestion ` check to allow spe

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -74,10 +75,50 @@ Both macros have to be defined to suggest replacement functions from *Annex K.* ``__STDC_WANT_LIB_EXT1__`` must be defined to ``1`` by the user **before** including any system headers. +.. _CustomFunctions: + +Custom functions + + +The opti

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -19,6 +19,8 @@ The check implements the following rules from the CERT C Coding Standard: Unsafe functions +The following functions are reported if :ref:`ReportDefaultFunctions` is enabled. whisperity wrote: ```suggestion The following fu

[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

2024-09-24 Thread via cfe-commits
@@ -74,10 +75,50 @@ Both macros have to be defined to suggest replacement functions from *Annex K.* ``__STDC_WANT_LIB_EXT1__`` must be defined to ``1`` by the user **before** including any system headers. +.. _CustomFunctions: + +Custom functions + + +The opti

[clang] 679c971 - [clang][bytecode] Fix vector shifts on big-endian systems (#109800)

2024-09-24 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-24T18:07:18+02:00 New Revision: 679c9717dfc9687a3bca78b45d9fd104b67e16f9 URL: https://github.com/llvm/llvm-project/commit/679c9717dfc9687a3bca78b45d9fd104b67e16f9 DIFF: https://github.com/llvm/llvm-project/commit/679c9717dfc9687a3bca78b45d9fd104b67e16f9.diff L

[clang] [clang][bytecode] Fix vector shifts on big-endian systems (PR #109800)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/109800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-24 Thread Erich Keane via cfe-commits
@@ -119,6 +119,15 @@ FIELD(HasInitMethod, 1, NO_MERGE) /// within anonymous unions or structs. FIELD(HasInClassInitializer, 1, NO_MERGE) +/// Custom attribute that is True if any field is marked as requiring explicit +/// initialization with [[clang::requires_explicit_initiali

[clang] [Clang][Driver] Add option to provide path for multilib's YAML config file (PR #109640)

2024-09-24 Thread via cfe-commits
@@ -1,79 +1,79 @@ -// RUN: %clang -print-multi-flags-experimental --target=aarch64-linux -fc++-abi=itanium -fsanitize=address | FileCheck --check-prefix=CHECK-LINUX %s +// RUN: %clang -multi-lib-config=%S/Inputs/multilib/empty.yaml -print-multi-flags-experimental --target=aarch6

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-24 Thread Shilei Tian via cfe-commits
shiltian wrote: > Is there a value in not defining 0 as flat? Like @AlexVlx mentioned, as well as the wording I put into `LangRef.rst`, SPIR/SPIR-V uses AS 4 as flat AS. > It's what we basically assume everywhere already, isn't it? I don't think this is technically true, but it is unfortunate

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-24 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/109420 >From af4cd0b3643e682fcb34042d209df03037743eb0 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Fri, 20 Sep 2024 14:16:23 +0100 Subject: [PATCH 1/2] [Clang][AArch64] Fix checkArmStreamingBuiltin for

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-24 Thread via cfe-commits
@@ -35,6 +35,15 @@ static const char *BTFKindStr[] = { #include "llvm/DebugInfo/BTF/BTF.def" }; +static const DIType *tryRemoveAtomicType(const DIType *Ty) { eddyz87 wrote: I meant that it seems that `tryRemoveAtomicType` is missing from `BTFTypeTypeTag::com

[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

2024-09-24 Thread via cfe-commits
c8ef wrote: CC @erichkeane @zyn0217, since I do not have permission to request reviewers. https://github.com/llvm/llvm-project/pull/109831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

  1   2   3   4   5   >