[clang] [Clang][RISCV] Recognize unsupport target feature by supporting... (PR #106495)

2024-08-29 Thread Piyou Chen via cfe-commits
@@ -391,7 +391,14 @@ void RISCVTargetInfo::fillValidTuneCPUList( static void handleFullArchString(StringRef FullArchStr, std::vector &Features) { - Features.push_back("__RISCV_TargetAttrNeedOverride"); + + // Should be full arch string. + if

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/106501 >From b5bb3c27c13f1d0f6af21e5f7d8fdad3727bf2d0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 29 Aug 2024 14:40:50 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Don't insert class not in named modules t

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-08-29 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/106495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-08-29 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/106495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102444 >From 4777ed31ebf1d631c394cd8f13a9355d177536d0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 8 Aug 2024 15:30:35 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Embed all source files for C++20 Modules

[clang] [clang-format] Correctly identifies token-pasted record names (PR #106484)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/106484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly identify token-pasted record names (PR #106484)

2024-08-29 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/106484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-08-29 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/106495 >From 64557cf6950c17a92b6d85980530abe1e193e111 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Wed, 28 Aug 2024 21:15:57 -0700 Subject: [PATCH 1/2] [Clang][RISCV] Recognize unsupport feature by supporting isValidFe

[clang] 47615ff - [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (#106501)

2024-08-29 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-08-29T15:42:57+08:00 New Revision: 47615ff2347a8be429404285de3b1c03b411e7af URL: https://github.com/llvm/llvm-project/commit/47615ff2347a8be429404285de3b1c03b411e7af DIFF: https://github.com/llvm/llvm-project/commit/47615ff2347a8be429404285de3b1c03b411e7af.diff LO

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 47615ff2347a8be429404285de3b1c03b411e7af https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Recognize unsupport target feature by supporting isValidFeatureName (PR #106495)

2024-08-29 Thread Piyou Chen via cfe-commits
@@ -391,7 +391,14 @@ void RISCVTargetInfo::fillValidTuneCPUList( static void handleFullArchString(StringRef FullArchStr, std::vector &Features) { - Features.push_back("__RISCV_TargetAttrNeedOverride"); + + // Should be full arch string. + if

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#106504 https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e5b55e6 - [clang-repl] Fix clang-repl for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.

2024-08-29 Thread Lang Hames via cfe-commits
Author: Lang Hames Date: 2024-08-29T17:50:49+10:00 New Revision: e5b55e606796bac0e28e2f0fdc6fb39a419f6b15 URL: https://github.com/llvm/llvm-project/commit/e5b55e606796bac0e28e2f0fdc6fb39a419f6b15 DIFF: https://github.com/llvm/llvm-project/commit/e5b55e606796bac0e28e2f0fdc6fb39a419f6b15.diff LO

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-08-29 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/106505 This is so that we are consistent with other sanitizers. Importantly, this makes the docs clearer. Driver flags are left unchanged (We are not proposing to rename `sancov` either). The good thing is that flag

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lldb @llvm/pr-subscribers-libcxx Author: cor3ntin (cor3ntin) Changes This is so that we are consistent with other sanitizers. Importantly, this makes the docs clearer. Driver flags are left unchanged (We are not proposing to rename `sancov` either). T

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: cor3ntin (cor3ntin) Changes This is so that we are consistent with other sanitizers. Importantly, this makes the docs clearer. Driver flags are left unchanged (We are not proposing to rename `sancov` either). The good thing is th

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-08-29 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 ec9f36a624fa9f8fea6e40384ce513b6da8c08e4 adb4a0eb00972811343ff05eac6977512f01970a --e

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

2024-08-29 Thread kadir çetinkaya via cfe-commits
kadircet wrote: This seems to be recognizing some initliazer list statements as blocks as well, e.g: ```objc $ cat a.m [bar bat:{{0, 1, 2, 3}} qq: qq]; ``` this seems to be formatted as: ```objc $ ~/repos/llvm/build/bin/clang-format -style='{AllowShortBlocksOnASingleLine: Never}' a.m [bar bat

[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-29 Thread via cfe-commits
ofAlpaca wrote: @cor3ntin Sure, thank you for the help. https://github.com/llvm/llvm-project/pull/105983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2eeeff8 - [C++20] [Modules] Embed all source files for C++20 Modules (#102444)

2024-08-29 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-08-29T16:06:03+08:00 New Revision: 2eeeff842f993a694159183a2834b4d305549cad URL: https://github.com/llvm/llvm-project/commit/2eeeff842f993a694159183a2834b4d305549cad DIFF: https://github.com/llvm/llvm-project/commit/2eeeff842f993a694159183a2834b4d305549cad.diff LO

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/102444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread kadir çetinkaya via cfe-commits
@@ -203,7 +203,7 @@ class ASTWalker : public RecursiveASTVisitor { bool VisitUsingDecl(UsingDecl *UD) { for (const auto *Shadow : UD->shadows()) { auto *TD = Shadow->getTargetDecl(); - auto IsUsed = TD->isUsed() || TD->isReferenced(); + auto IsUsed = TD->i

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106430 From 9a96724fba63c91eefca804112c8e862e5427c10 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 28 Aug 2024 20:30:08 +0200 Subject: [PATCH] [include-cleaner] Mark RecordDecls referenced in UsingDecls a

[clang] b822b69 - [Driver] Add -mbranch-protection to ARM and AArch64 multilib flags (#106391)

2024-08-29 Thread via cfe-commits
Author: Lucas Duarte Prates Date: 2024-08-29T09:11:48+01:00 New Revision: b822b69ff54bcd2f08445bd02b8dad0584422874 URL: https://github.com/llvm/llvm-project/commit/b822b69ff54bcd2f08445bd02b8dad0584422874 DIFF: https://github.com/llvm/llvm-project/commit/b822b69ff54bcd2f08445bd02b8dad0584422874

[clang] [Driver] Add -mbranch-protection to ARM and AArch64 multilib flags (PR #106391)

2024-08-29 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas closed https://github.com/llvm/llvm-project/pull/106391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread via cfe-commits
cor3ntin wrote: What this discussed/reviewed/motivated? https://github.com/llvm/llvm-project/pull/102444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/4498 Here is the relevant piece of the build log for

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Was this discussed/reviewed/motivated? There are drawbacks to this approach > outlined in #72383 > > @iains @jyknight @AaronBallman @Bigcheese The motivation is in https://github.com/llvm/llvm-project/issues/72383 and I comment in https://github.com/llvm/llvm-project/issu

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,565 @@ +/*===--- avx10_2_512bf16intrin.h - AVX10-BF16 intrinsics -=== + * + * 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: Apache

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,1054 @@ +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64 -target-feature +avx10.2-512 -emit-llvm -o - -Wno-invalid-feature-combination -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -7219,3 +7219,413 @@ def int_x86_avx10_mask_vcvtneph2hf8s512 : ClangBuiltin<"__builtin_ia32_vcvtneph2 DefaultAttrsIntrinsic<[llvm_v32i8_ty], [llvm_v32f16_ty, llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; } + +//===

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,565 @@ +/*===--- avx10_2_512bf16intrin.h - AVX10-BF16 intrinsics -=== + * + * 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: Apache

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -147,11 +147,13 @@ set(x86_files amxcomplexintrin.h amxfp16intrin.h amxintrin.h + avx10_2_512bf16intrin.h avx10_2_512convertintrin.h avx10_2_512minmaxintrin.h avx10_2_512niintrin.h avx10_2_512satcvtintrin.h avx10_2convertintrin.h + avx10_2bf16intrin.h

[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: You have to resolve the conflict in `ReleaseNotes.rst` firsrt https://github.com/llvm/llvm-project/pull/105983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. I'm very confused. `readonly` means that the memory behind `this` cannot be changed, not that the pointer cannot be changed. https://github.com/llvm/llvm-project/pull/106499 ___ cfe-comm

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I'm very confused. `readonly` means that the memory behind `this` cannot be > changed, not that the pointer cannot be changed. Out of curiosity, it looks not same in https://llvm.org/docs/LangRef.html: > This attribute indicates that the function does not write through this

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-BF16 new instructions. (PR #101603)

2024-08-29 Thread Freddy Ye via cfe-commits
@@ -910,3 +910,313 @@ multiclass avx10_convert_2op_nomb, AVX512XDIi8Base, T_MAP5, EVEX, EVEX_CD8<16, CD8VH>; + +//- +// AVX10 BF16 instructions +//- + +// VADDNEPBF16

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-29 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/97762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b9f4afa - [clang][ExtractAPI] Fix iteration order of TopLevelRecords (#106411)

2024-08-29 Thread via cfe-commits
Author: Daniel Grumberg Date: 2024-08-29T10:02:01+01:00 New Revision: b9f4afa1674fe6f101b298d4893cde2ab2d16877 URL: https://github.com/llvm/llvm-project/commit/b9f4afa1674fe6f101b298d4893cde2ab2d16877 DIFF: https://github.com/llvm/llvm-project/commit/b9f4afa1674fe6f101b298d4893cde2ab2d16877.dif

[clang] [clang][ExtractAPI] Fix iteration order of TopLevelRecords (PR #106411)

2024-08-29 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/106411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-29 Thread via cfe-commits
https://github.com/kiran-isaac updated https://github.com/llvm/llvm-project/pull/102896 >From eb7551e83618d8452f5dadae1be4aff8f6c9d23c Mon Sep 17 00:00:00 2001 From: Kiran Date: Thu, 8 Aug 2024 13:07:24 +0100 Subject: [PATCH 1/4] [ARM] musttail fixes Backend: - Caller and callee arguments no l

[clang] [clang][bytecode] Properly diagnose non-const reads (PR #106514)

2024-08-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106514 If the global variable is constant (but not constexpr), we need to diagnose, but keep evaluating. >From e9e4774a38975de976793d7941b6eae68dde7711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[clang] [clang][bytecode] Properly diagnose non-const reads (PR #106514)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes If the global variable is constant (but not constexpr), we need to diagnose, but keep evaluating. --- Full diff: https://github.com/llvm/llvm-project/pull/106514.diff 2 Files Affected: - (modified) clang/

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-29 Thread via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s + +template class S> +void create_unique() + requires (S{0}, true) {} + +template struct A { + constexpr A(Fn) {}; +}; + +template void create_unique(); +// CHECK: @_

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)

2024-08-29 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Hello, The following starts crashing with this patch: ``` clang -cc1 -analyze -analyzer-checker=core bbi-98571.c ``` Result: ``` bbi-98571.c:2:14: warning: expected ';' at end of declaration list 2 | struct a *b | ^ | ; bbi-98571.c:

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N */ sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-29 Thread via cfe-commits
https://github.com/whisperity edited https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add sign intrinsic part 3 (PR #101989)

2024-08-29 Thread Tim Gymnich via cfe-commits
tgymnich wrote: @farzonl This PR requires the SPIRV part (https://github.com/llvm/llvm-project/pull/101987) to be merged. https://github.com/llvm/llvm-project/pull/101989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-29 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/99042 >From aa74d04751558f3ab47d566c91fb8ad178df0dce Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Tue, 16 Jul 2024 13:37:34 +0100 Subject: [PATCH 1/2] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX

[clang] [clang][bytecode] Properly diagnose non-const reads (PR #106514)

2024-08-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106514 >From a8eaf58bcae529a3629dbd1b84df58e9557dde5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 29 Aug 2024 10:21:54 +0200 Subject: [PATCH] [clang][bytecode] Properly diagnose non-const r

[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition( // Add an enclosing time trace scope for a bunch of small scopes with // "EvaluateAsConstExpr". llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]() { -

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Zhijin Zeng via cfe-commits
zengdage wrote: Sorry, I misunderstand the 'readonly' meaning. So this pr is wrong. https://github.com/llvm/llvm-project/pull/106499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Zhijin Zeng via cfe-commits
https://github.com/zengdage closed https://github.com/llvm/llvm-project/pull/106499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Nikita Popov via cfe-commits
nikic wrote: > > I'm very confused. `readonly` means that the memory behind `this` cannot be > > changed, not that the pointer cannot be changed. > > Out of curiosity, it looks not same in https://llvm.org/docs/LangRef.html: > > > This attribute indicates that the function does not write throu

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -48,8 +52,14 @@ static const Expr *getDenomExpr(const ExplodedNode *N) { void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const { + if (!ChecksEnabled[CK_DivZeroChecker]) +return; + if (!BugType

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-29 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: LGTM overall, I added some minor inline remarks. Also consider adding a few simple testcases to distinguish the effects of DivideZero and TaintedDiv. It would also be interesting to highlight what happens in situations like ```c int test(void) { int x

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -113,9 +130,28 @@ void DivZeroChecker::checkPreStmt(const BinaryOperator *B, } void ento::registerDivZeroChecker(CheckerManager &mgr) { - mgr.registerChecker(); + DivZeroChecker *checker = mgr.registerChecker(); + ; NagyDonat wrote: Delete this empty st

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -25,16 +25,20 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker< check::PreStmt > { - const BugType BT{this, "Division by zero"}; - const BugType TaintBT{this, "Division by zero", categories::TaintedData}; +class DivZeroChe

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-29 Thread Donát Nagy via cfe-commits
@@ -58,8 +68,15 @@ void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, void DivZeroChecker::reportTaintBug( StringRef Msg, ProgramStateRef StateZero, CheckerContext &C, llvm::ArrayRef TaintedSyms) const { + if (!ChecksEnabled[CK_TaintedDivChecker]

[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-29 Thread via cfe-commits
https://github.com/ofAlpaca updated https://github.com/llvm/llvm-project/pull/105983 >From 7f13ff52821a6c2ba58236fe363fb9a3a378c33b Mon Sep 17 00:00:00 2001 From: ofAlpaca Date: Sun, 25 Aug 2024 17:02:11 +0800 Subject: [PATCH 1/5] Fix for GH102064 --- clang/include/clang/Basic/Builtins.td | 2

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

2024-08-29 Thread via cfe-commits
@@ -19,6 +19,9 @@ The check implements the following rules from the CERT C Coding Standard: Unsafe functions +The following functions are reported if `ReportDefaultFunctions +`_ is enabled. + whisperity wrote: Instead of the automatically ge

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

2024-08-29 Thread via cfe-commits
@@ -136,6 +128,15 @@ class MatchesAnyListedNameMatcher } }; + bool matches( + const NamedDecl &Node, ast_matchers::internal::ASTMatchFinder *Finder, + ast_matchers::internal::BoundNodesTreeBuilder *Builder) const override { +return llvm::any_of(NameMatcher

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

2024-08-29 Thread via cfe-commits
whisperity wrote: High-level design question: Why is `CustomAnnexKFunctions` a thing? 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] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-29 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: seems patch got lost CC: @steakhal @NagyDonat https://github.com/llvm/llvm-project/pull/104599 ___ 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-08-29 Thread via cfe-commits
@@ -136,6 +128,15 @@ class MatchesAnyListedNameMatcher } }; + bool matches( + const NamedDecl &Node, ast_matchers::internal::ASTMatchFinder *Finder, + ast_matchers::internal::BoundNodesTreeBuilder *Builder) const override { +return llvm::any_of(NameMatcher

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

2024-08-29 Thread via cfe-commits
Discookie wrote: `CustomAnnexKFunctions` exists because the checker has two different internal matching modes for whether AnnexK is enabled or not. This both depends on `__STDC_LIB_EXT1__` (defined by system) `__STDC_WANT_LIB_EXT1__` (defined by the user), so it's reasonable to expect that a p

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N */ sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-29 Thread via cfe-commits
https://github.com/whisperity ready_for_review https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-29 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/99042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-29 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. A couple of suggestions but otherwise this looks good to me. https://github.com/llvm/llvm-project/pull/99042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-29 Thread Paul Walker via cfe-commits
@@ -0,0 +1,115 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -mattr=+sve2 < %s | FileCheck %s +; RUN: llc -mattr=+sme2 -force-streaming < %s | FileCheck %s + +target triple = "aarch64-linux" + +define @famin_f

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-29 Thread Paul Walker via cfe-commits
@@ -717,6 +717,11 @@ let Predicates = [HasSVEorSME] in { defm FDIV_ZPZZ : sve_fp_bin_pred_hfd; } // End HasSVEorSME +let Predicates = [HasSVE2orSME2, HasFAMINMAX] in { + defm FAMAX_ZPZZ : sve_fp_bin_pred_hfd; + defm FAMIN_ZPZZ : sve_fp_bin_pred_hfd; +} +

[clang] [clang][bytecode] Diagnose member calls on deleted blocks (PR #106529)

2024-08-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106529 This requires a bit of restructuring of ctor calls when checking for a potential constant expression. >From 86f776e9de9ddee4bb5c35f6f6cd7959795bea8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

[clang] [clang][bytecode] Diagnose member calls on deleted blocks (PR #106529)

2024-08-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This requires a bit of restructuring of ctor calls when checking for a potential constant expression. --- Full diff: https://github.com/llvm/llvm-project/pull/106529.diff 6 Files Affected: - (modified) cl

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-29 Thread Alexandros Lamprineas via cfe-commits
@@ -305,9 +305,17 @@ def FeatureWFxT : ExtensionWithMArch<"wfxt", "WFxT", "FEAT_WFxT", def FeatureHCX : Extension<"hcx", "HCX", "FEAT_HCX", "Enable Armv8.7-A HCRX_EL2 system register">; -def FeatureLS64 : ExtensionWithMArch<"ls64", "LS64", - "FEAT_LS64, FEAT_LS64_V, FEAT_L

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-29 Thread Alexandros Lamprineas via cfe-commits
@@ -305,9 +305,17 @@ def FeatureWFxT : ExtensionWithMArch<"wfxt", "WFxT", "FEAT_WFxT", def FeatureHCX : Extension<"hcx", "HCX", "FEAT_HCX", "Enable Armv8.7-A HCRX_EL2 system register">; -def FeatureLS64 : ExtensionWithMArch<"ls64", "LS64", - "FEAT_LS64, FEAT_LS64_V, FEAT_L

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/106241 From f8fb04379255a783f1fbdcd07cfff5846d253d32 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 27 Aug 2024 17:56:47 +0200 Subject: [PATCH] [clang] Cleanup IncludeLocMap CompilerInstance can re-use sam

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 Thread kadir çetinkaya via cfe-commits
@@ -350,6 +350,7 @@ void SourceManager::clearIDTables() { LastLineNoContentCache = nullptr; LastFileIDLookup = FileID(); + IncludedLocMap.clear(); kadircet wrote: done https://github.com/llvm/llvm-project/pull/106241

[clang] [clang] Cleanup IncludeLocMap (PR #106241)

2024-08-29 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 fdca2c33a1f33f4886d969ea0f0219764c7b6b59 f8fb04379255a783f1fbdcd07cfff5846d253d32 --e

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Was this discussed/reviewed/motivated? There are drawbacks to this approach > > outlined in #72383 > > @iains @jyknight @AaronBallman @Bigcheese > > The motivation is in #72383 and I comment in [#72383 > (comment)](https://github.com/llvm/llvm-project/issues/72383#issue

[clang] cb608cc - [clang][bytecode] Properly diagnose non-const reads (#106514)

2024-08-29 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-29T13:44:59+02:00 New Revision: cb608cc5f62baa01fe106a14ef41971337c2c030 URL: https://github.com/llvm/llvm-project/commit/cb608cc5f62baa01fe106a14ef41971337c2c030 DIFF: https://github.com/llvm/llvm-project/commit/cb608cc5f62baa01fe106a14ef41971337c2c030.diff L

[clang] [clang][bytecode] Properly diagnose non-const reads (PR #106514)

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

[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationOrFunctionDefinition( // Add an enclosing time trace scope for a bunch of small scopes with // "EvaluateAsConstExpr". llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]() { -

[clang] [clang-tools-extra] [clang] Hide the `DiagnosticOptions` pointer from `CompilerInvocation` (PR #106274)

2024-08-29 Thread kadir çetinkaya via cfe-commits
kadircet wrote: yes turning diagnosticoptions to be a ThreadSafeRefCountedBase pointer should ensure we have similar guarantees. so LG from clangd side, but I am not sure about implications on using thread-aware structs in core parts of clang. so it might be worthwhile to get some opinions fro

[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
@@ -223,15 +223,15 @@ Frontend (test.cc) | | | | EvaluateAsRValue () | | | EvaluateAsBooleanCondition () | | | | EvaluateAsRValue () -| ParseDeclarationOrFunctionDefinition (test.cc:16:1) +| ParseDeclarationOrFunctionDefinition (test.cc:16) | | ParseFunctionDefinition (slow_te

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/106430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread Haojian Wu via cfe-commits
@@ -203,7 +203,7 @@ class ASTWalker : public RecursiveASTVisitor { bool VisitUsingDecl(UsingDecl *UD) { for (const auto *Shadow : UD->shadows()) { auto *TD = Shadow->getTargetDecl(); - auto IsUsed = TD->isUsed() || TD->isReferenced(); + auto IsUsed = TD->i

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-29 Thread via cfe-commits
https://github.com/ivanaivanovska updated https://github.com/llvm/llvm-project/pull/103039 >From 6d3e4470dfe21f8f3832a2d38b4c4327aa7422a3 Mon Sep 17 00:00:00 2001 From: Ivana Ivanovska Date: Tue, 13 Aug 2024 10:30:34 + Subject: [PATCH 1/3] Added instant events and marking defered templated

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

[clang-tools-extra] acff429 - [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (#106430)

2024-08-29 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-08-29T14:23:57+02:00 New Revision: acff429191a27a164a0941346ce0c73e953d4638 URL: https://github.com/llvm/llvm-project/commit/acff429191a27a164a0941346ce0c73e953d4638 DIFF: https://github.com/llvm/llvm-project/commit/acff429191a27a164a0941346ce0c73e953d4638.dif

[clang-tools-extra] [include-cleaner] Mark RecordDecls referenced in UsingDecls as explicit (PR #106430)

2024-08-29 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/106430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

2024-08-29 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/106277 >From b2bb29ec61f4e9a7b3b7f9bcd0f5b7a12c844d14 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 27 Aug 2024 19:44:34 + Subject: [PATCH 1/3] [clang] Properly set file and line info for -ftime-trace ---

  1   2   3   4   5   >