[clang] [llvm] [AArch64] Introduce the Armv9.5-A architecture version (PR #72392)

2023-11-15 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas created https://github.com/llvm/llvm-project/pull/72392 This introduces the Armv9.5-A architecture version, including the relevant command-line option for -march. Mode details about the Armv9.5-A architecture version can be found at: * https://community.arm.com/arm

[clang] [llvm] [AArch64] Introduce the Armv9.5-A architecture version (PR #72392)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Lucas Duarte Prates (pratlucas) Changes This introduces the Armv9.5-A architecture version, including the relevant command-line option for -march. Mode details about the Armv9.5-A architecture version can

[clang] [clang][Analyzer][NFC] Use condition type for comparison in several checkers (PR #72358)

2023-11-15 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. The change is a straightforward, useful improvement. The failure of Modules/decl-params-determinisim.m (among the buildbot results) seems to be completely unrelated to this change. https://github.com/llvm/llvm-project/pull/72358 ___

[llvm] [clang] [AArch64] Introduce the Armv9.5-A architecture version (PR #72392)

2023-11-15 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 b7b6d54004ef8a89dc3bad411f11a1ef93319a13 98ac417eff3ba114cc56241635917190930df266 --

[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)

2023-11-15 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/72394 Make trivial ctor/dtor implicitly host device functions so that they can be used to initialize file-scope device variables to match nvcc behavior. Fixes: https://github.com/llvm/llvm-project/issues/72261 Fixes

[clang] [CUDA][HIP] make trivial ctor/dtor host device (PR #72394)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Make trivial ctor/dtor implicitly host device functions so that they can be used to initialize file-scope device variables to match nvcc behavior. Fixes: https://github.com/llvm/llvm-project/issues/72261

[llvm] [clang] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-15 Thread Michael Buch via cfe-commits
Michael137 wrote: > @adrian-prantl We do have a pretty strong guarantee of compatibility in the > llvm-c API. A new parameter pretty much means you need to define a new > function. Ended not changing the C-API in the relanded version https://github.com/llvm/llvm-project/pull/72234 ___

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/72385 >From 2b01f9d8cb945d8332a271947492ec0fe7a6f7c0 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 15 Nov 2023 01:13:10 -0800 Subject: [PATCH] [clang-tidy] Add new modernize-string-find-startswith check

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-15 Thread David Sherwood via cfe-commits
https://github.com/david-arm commented: Wow, this is a huge patch. :) It took me a few hours to work through all the tests, and it's quite possible I've missed something. However, overall it looks fine and I can't see any major issues. I think there is one missing test, but once that's fixed I

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-15 Thread David Sherwood via cfe-commits
https://github.com/david-arm edited https://github.com/llvm/llvm-project/pull/70474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-15 Thread David Sherwood via cfe-commits
@@ -0,0 +1,2503 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -emit-ll

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-15 Thread Michael Buch via cfe-commits
Michael137 wrote: > We're seeing crashes after this. Here is a reproducer: > https://bugs.chromium.org/p/chromium/issues/detail?id=1502489#c1 > > Please consider reverting if it can't be fixed quickly (I had a look, but it > seems there are some dependent changes on top). Thanks for reporting

[clang] [llvm] [AArch64] Add support for Cortex-A520, Cortex-A720 and Cortex-X4 CPUs (PR #72395)

2023-11-15 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/72395 Cortex-A520, Cortex-A720 and Cortex-X4 are Armv9.2 AArch64 CPUs. Technical Reference Manual for Cortex-A520: https://developer.arm.com/documentation/102517/latest/ Technical Reference Manual for Cortex-A720

[clang] [llvm] [AArch64] Add support for Cortex-A520, Cortex-A720 and Cortex-X4 CPUs (PR #72395)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang Author: Jonathan Thackray (jthackray) Changes Cortex-A520, Cortex-A720 and Cortex-X4 are Armv9.2 AArch64 CPUs. Technical Reference Manual for Cortex-A520: https://developer.arm.com/documentation/102517/lates

[llvm] [clang] [AArch64] Add support for Cortex-A520, Cortex-A720 and Cortex-X4 CPUs (PR #72395)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jonathan Thackray (jthackray) Changes Cortex-A520, Cortex-A720 and Cortex-X4 are Armv9.2 AArch64 CPUs. Technical Reference Manual for Cortex-A520: https://developer.arm.com/documentation/102517/latest/ Technical Reference Manual

[llvm] [clang] [AArch64] Add support for Cortex-A520, Cortex-A720 and Cortex-X4 CPUs (PR #72395)

2023-11-15 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 b7b6d54004ef8a89dc3bad411f11a1ef93319a13 2656af94138e61452f34b1a599fe1d54eee2aee9 --

[clang] [llvm] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov edited https://github.com/llvm/llvm-project/pull/71930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -0,0 +1,217 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1\ +// RUN: -S -Werror -emit-llvm -disable-O0-

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -1992,3 +1992,36 @@ let TargetGuard = "sme2" in { def SVADD_SINGLE_X2 : SInst<"svadd[_single_{d}_x2]", "22d", "cUcsUsiUilUl", MergeNone, "aarch64_sve_add_single_x2", [IsStreaming], []>; def SVADD_SINGLE_X4 : SInst<"svadd[_single_{d}_x4]", "44d", "cUcsUsiUilUl", MergeNon

[clang] [llvm] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -1992,3 +1992,36 @@ let TargetGuard = "sme2" in { def SVADD_SINGLE_X2 : SInst<"svadd[_single_{d}_x2]", "22d", "cUcsUsiUilUl", MergeNone, "aarch64_sve_add_single_x2", [IsStreaming], []>; def SVADD_SINGLE_X4 : SInst<"svadd[_single_{d}_x4]", "44d", "cUcsUsiUilUl", MergeNon

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -0,0 +1,217 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1\ +// RUN: -S -Werror -emit-llvm -disable-O0-

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -0,0 +1,216 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1\ +// RUN: -S -Werror -emit-llvm -disable-O0-

[clang] [llvm] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov commented: In addition to the code comments: In the (tentative) commit message the prototype `svuint8_t svextq_lane[_u8](svuint8_t zdn,` is cut short. The prototype of `svint8_t svtbxq[_s8](svint8_t zn, svuint8_t zm);` is missing an parameter. The attribution

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -0,0 +1,217 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1\ +// RUN: -S -Werror -emit-llvm -disable-O0-

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -116,3 +116,9 @@ void test_svdot_lane_2way(svint32_t s32, svuint32_t u32, svint16_t s16, svuint16 svdot_lane_u32_u16_u16(u32, u16, u16, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}} svdot_lane_f32_f16_f16(f32, f16, f16, 4); // expected-err

[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)

2023-11-15 Thread Momchil Velikov via cfe-commits
@@ -1992,3 +1992,36 @@ let TargetGuard = "sme2" in { def SVADD_SINGLE_X2 : SInst<"svadd[_single_{d}_x2]", "22d", "cUcsUsiUilUl", MergeNone, "aarch64_sve_add_single_x2", [IsStreaming], []>; def SVADD_SINGLE_X4 : SInst<"svadd[_single_{d}_x4]", "44d", "cUcsUsiUilUl", MergeNon

[clang] [AArch64][SME2] Enable bfm builtins for sme2 (PR #71927)

2023-11-15 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 updated https://github.com/llvm/llvm-project/pull/71927 >From ff33739706ce758f416153aa3cdb7c632e068da3 Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Thu, 9 Nov 2023 17:39:26 + Subject: [PATCH 1/4] [AArch64][SME2] Enable bfm builtings for sme2 This patch en

[clang] [Clang] counted_by attr can apply only to C99 flexible array members (PR #72347)

2023-11-15 Thread Kees Cook via cfe-commits
https://github.com/kees approved this pull request. Yes, this looks correct. We don't want to let this feature leak into the "fake" flex array logic. https://github.com/llvm/llvm-project/pull/72347 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-15 Thread via cfe-commits
serge-sans-paille wrote: @efriedma-quic : gentle ping :-) https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fputc` in StreamChecker (PR #71518)

2023-11-15 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/71518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-15 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/71877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-15 Thread Kees Cook via cfe-commits
@@ -827,6 +827,165 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } +llvm::Value * +CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, +

[clang] [Clang] Correct handling of negative and out-of-bounds indices (PR #71877)

2023-11-15 Thread Kees Cook via cfe-commits
https://github.com/kees commented: For the test cases, I wonder if it might be good to add __bdos() calls with type 0 as well. The results should always be the same, but we do want to check for that. i.e.: ` p->array[index] = __builtin_dynamic_object_size(&p->count, 0);` https://github.com/

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/72385 >From d9995b339e787374452b65fcffa8b3acf4aade3d Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 15 Nov 2023 01:13:10 -0800 Subject: [PATCH] [clang-tidy] Add new modernize-string-find-startswith check

[clang] [libclang] Compute the right spelling location (PR #72400)

2023-11-15 Thread Sebastian Poeplau via cfe-commits
https://github.com/sebastianpoeplau created https://github.com/llvm/llvm-project/pull/72400 Locations inside macro expansions have different spelling/expansion locations. Apply a FIXME to make the libclang function clang_getSpellingLocation return the right spelling location, and adapt the tes

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-15 Thread Michael Buch via cfe-commits
Michael137 wrote: > > We're seeing crashes after this. Here is a reproducer: > > https://bugs.chromium.org/p/chromium/issues/detail?id=1502489#c1 > > Please consider reverting if it can't be fixed quickly (I had a look, but > > it seems there are some dependent changes on top). > > Thanks for

[compiler-rt] [clang-tools-extra] [libcxx] [llvm] [libc] [flang] [clang] [libc++] Implement ranges::iota (PR #68494)

2023-11-15 Thread James E T Smith via cfe-commits
jamesETsmith wrote: @philnik777 or @var-const, I think this is ready to go, but let me know if you have any other suggestions. https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-15 Thread Sebastian Poeplau via cfe-commits
https://github.com/sebastianpoeplau created https://github.com/llvm/llvm-project/pull/72401 The LinkageSpec case was omitted, and there is a declared CXCursor_Kind for it. Adapt the testsuite drivers to print mangled names for declarations with extern linkage. Also update the test baseline for

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sebastian Poeplau (sebastianpoeplau) Changes The LinkageSpec case was omitted, and there is a declared CXCursor_Kind for it. Adapt the testsuite drivers to print mangled names for declarations with extern linkage. Also update the test bas

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Utkarsh Saxena via cfe-commits
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error < def err_coro_invalid_addr_of_label : Error< "the GNU address of label extension is not allowed in coroutines." >; +def err_coroutine_return_type : Error< + "function returns a coroutine return type %0 but

[clang] [libclang] Compute the right spelling location (PR #72400)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sebastian Poeplau (sebastianpoeplau) Changes Locations inside macro expansions have different spelling/expansion locations. Apply a FIXME to make the libclang function clang_getSpellingLocation return the right spelling location, and adap

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/71945 >From 89a2d60fc012742a74a008fb77213bcd47734503 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 10 Nov 2023 15:10:44 +0100 Subject: [PATCH 1/6] [coroutines] Introduce [[clang::coro_return_type]] and [[clang

[clang] [libclang] Compute the right spelling location (PR #72400)

2023-11-15 Thread Sebastian Poeplau via cfe-commits
https://github.com/sebastianpoeplau updated https://github.com/llvm/llvm-project/pull/72400 >From db1f8becea210494ae42619cba3ad697cddc07bf Mon Sep 17 00:00:00 2001 From: Matthieu Eyraud Date: Mon, 11 Apr 2022 16:53:24 +0200 Subject: [PATCH] [libclang] Compute the right spelling location Locati

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-15 Thread via cfe-commits
https://github.com/DonatNagyE created https://github.com/llvm/llvm-project/pull/72402 ...to model the results of alloca() and _alloca() calls. Previously it acted as if these functions were returning memory from the heap, which led to alpha.security.ArrayBoundV2 producing incorrect messages.

[clang] [analyzer] Use AllocaRegion in MallocChecker (PR #72402)

2023-11-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: None (DonatNagyE) Changes ...to model the results of alloca() and _alloca() calls. Previously it acted as if these functions were returning memory from the heap, which led to alpha.security.Arr

[clang] [clang][Analyzer] Move checker 'alpha.unix.Errno' to 'unix.Errno'. (PR #69469)

2023-11-15 Thread Balázs Kéri via cfe-commits
balazske wrote: > I also think that the > [reports](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=postgres_REL_13_0_errno_alpha_unix&newcheck=postgres_REL_13_0_errno_unix&is-unique=on&diff-type=New&report-id=3253666&report-hash=b4e0b723164236269fe6078ad32a0456&repo

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-11-15 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: @AnastasiaStulova Could you please take a look? thanks https://github.com/llvm/llvm-project/pull/66651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Compute the right spelling location (PR #72400)

2023-11-15 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 ac378ac493426f8094cfaa176f1e88b62914f630 88b94c936257100e5400ad37273bb9d509ecfe3c --

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-11-15 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: Overall I think it is the right way to go. Memory scope has been used by different offloading languages and the atomic clang builtins are essentially the same. Adding a generic clang atomic builtins with memory scope allows code sharing among offloading languages. https://gith

[clang-tools-extra] [llvm] [clang] [compiler-rt] [flang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-15 Thread Erich Keane via cfe-commits
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [HLSL] Parameter modifier parsing and AST (PR #72139)

2023-11-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/72139 >From 8be56542f25b08ee5d6a325f76d12c28c4a366d7 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 13 Nov 2023 11:14:06 -0600 Subject: [PATCH 1/2] [HLSL] Parameter modifier parsing and AST This change im

[flang] [clang] [flang] Add dependent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/72121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add dependent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/72121 ___ 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 new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Oliver Stöneberg via cfe-commits
firewave wrote: I wonder if this should also detect the `str.compare("marker", 0, 6) == 0` pattern. There is possibly some kind of pattern involving `std::equal()` as well. Could as well be a different check though. Not sure if it would have a performance impact to use `starts_with()` instead

[clang] 77ecb9a - [flang] Add dependent-lib option to flang -fc1 on Windows (#72121)

2023-11-15 Thread via cfe-commits
Author: David Truby Date: 2023-11-15T15:26:43Z New Revision: 77ecb9a49bb1640684c37f80ffe56bc54dae6502 URL: https://github.com/llvm/llvm-project/commit/77ecb9a49bb1640684c37f80ffe56bc54dae6502 DIFF: https://github.com/llvm/llvm-project/commit/77ecb9a49bb1640684c37f80ffe56bc54dae6502.diff LOG: [

[clang] [flang] [flang] Add dependent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread David Truby via cfe-commits
https://github.com/DavidTruby closed https://github.com/llvm/llvm-project/pull/72121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-15 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/71945 >From 89a2d60fc012742a74a008fb77213bcd47734503 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 10 Nov 2023 15:10:44 +0100 Subject: [PATCH 1/7] [coroutines] Introduce [[clang::coro_return_type]] and [

[clang] [clang][Analyzer] Move checker 'alpha.unix.Errno' to 'unix.Errno'. (PR #69469)

2023-11-15 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. > > I also think that the > > [reports](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=postgres_REL_13_0_errno_alpha_unix&newcheck=postgres_REL_13_0_errno_unix&is-unique=on&diff-type=New&report-id=3253666&rep

[clang] [clang][Analyzer] Move checker 'alpha.unix.Errno' to 'unix.Errno'. (PR #69469)

2023-11-15 Thread via cfe-commits
https://github.com/DonatNagyE edited https://github.com/llvm/llvm-project/pull/69469 ___ 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 new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/72385 >From d31148a9d99004f1a64dc6dc1bce85a58985aa0f Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 15 Nov 2023 01:13:10 -0800 Subject: [PATCH] [clang-tidy] Add new modernize-string-find-startswith check

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: would be to support also endswith in same check, so i'm not so sure about check name. https://github.com/llvm/llvm-project/pull/72385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[llvm] [clang] [compiler-rt] [flang] [clang-tools-extra] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-15 Thread via cfe-commits
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- StringFindStartswithCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/72385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [compiler-rt] [flang] [clang-tools-extra] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-15 Thread Erich Keane via cfe-commits
@@ -322,6 +322,81 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [flang] [compiler-rt] [clang-tools-extra] [llvm] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-15 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/70762 ___ 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 new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- StringFindStartswithCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- StringFindStartswithCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,41 @@ +//===--- StringFindStartswithCheck.h - clang-tidy ---*- 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: Apa

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
@@ -181,6 +181,14 @@ New checks points in a coroutine. Such hostile types include scoped-lockable types and types belonging to a configurable denylist. +- New :doc:`modernize-string-find-startswith + ` check. + + Checks whether a ``std::string::find()`` or ``std::string:

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,105 @@ +//===--- StringFindStartswithCheck.cpp - clang-tidy ---===// +// +// 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

[llvm] [compiler-rt] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-15 Thread Sander de Smalen via cfe-commits
@@ -508,6 +508,9 @@ def FeatureSMEI16I64 : SubtargetFeature<"sme-i16i64", "HasSMEI16I64", "true", def FeatureSMEF16F16 : SubtargetFeature<"sme-f16f16", "HasSMEF16F16", "true", "Enable SME2.1 non-widening Float16 instructions (FEAT_SME_F16F16)", []>; +def FeatureSMEFA64 : Su

[compiler-rt] [clang] [llvm] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-15 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/70809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-15 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. LGTM with nit addressed https://github.com/llvm/llvm-project/pull/70809 ___ 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 new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Oliver Stöneberg via cfe-commits
firewave wrote: > would be to support also endswith in same check +1 On a side note: I will be looking into the related patterns and their performance soon as I am getting very strange code/performance when they are used outside of a benchmark - especially with Clang. https://github.com/llvm

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: > Detect the `str.compare("marker", 0, 6) == 0` pattern. This is actually in my notes for making this check / codemod. No performance impact so not tackling yet, maybe in the future. > Support `ends_with` in same check. Similar as above, matching for that length argument is a

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,41 @@ +//===--- StringFindStartswithCheck.h - clang-tidy ---*- 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: Apa

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Oliver Stöneberg via cfe-commits
firewave wrote: > Any thoughts on open-ended check name instead? `modernize-string-find-affix` > (affix = prefix | suffix)? `modernize-string-startswith-endswith` is the first what popped into my head but it would not have been my first choice. Would this also be the check you would implement

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-11-15 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: ping @shafik @cor3ntin @ChuanqiXu9, how can we make progress here? https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/72389 >From fef3782ff1d4f2344b98eae4cf339e8cc1239fd7 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Wed, 15 Nov 2023 13:46:54 + Subject: [PATCH] [APINotes] Upstream APINotesManager This upstreams more of the Cl

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Maybe modernize-use-starts-ends-with https://github.com/llvm/llvm-project/pull/72385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add dependent-lib option to flang -fc1 on Windows (PR #72121)

2023-11-15 Thread antoine moynault via cfe-commits
antmox wrote: hello! looks like this broke some bots: https://lab.llvm.org/buildbot/#/builders/175/builds/39052 https://lab.llvm.org/buildbot/#/builders/268/builds/2443 could it be the missing colon after REQUIRES in dependent-lib.f90 ? https://github.com/llvm/llvm-project/pull/72121 ___

[llvm] [mlir] [clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-15 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/68565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [clang] [llvm] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-15 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. Thanks for all the changes! LGTM with few little nits addressed. https://github.com/llvm/llvm-project/pull/68565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [mlir] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-15 Thread Sander de Smalen via cfe-commits
@@ -4850,6 +4852,93 @@ SDValue AArch64TargetLowering::getPStateSM(SelectionDAG &DAG, SDValue Chain, Mask); } +// Lower an SME LDR/STR ZA intrinsic to LDR_ZA_PSEUDO or STR_ZA. +// Case 1: If the vector number (vecnum) is an immediate in range, it gets +//

[mlir] [llvm] [clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-15 Thread Sander de Smalen via cfe-commits
@@ -4850,6 +4852,93 @@ SDValue AArch64TargetLowering::getPStateSM(SelectionDAG &DAG, SDValue Chain, Mask); } +// Lower an SME LDR/STR ZA intrinsic to LDR_ZA_PSEUDO or STR_ZA. +// Case 1: If the vector number (vecnum) is an immediate in range, it gets +//

[mlir] [clang] [llvm] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-15 Thread Sander de Smalen via cfe-commits
@@ -4850,6 +4852,93 @@ SDValue AArch64TargetLowering::getPStateSM(SelectionDAG &DAG, SDValue Chain, Mask); } +// Lower an SME LDR/STR ZA intrinsic to LDR_ZA_PSEUDO or STR_ZA. sdesmalen-arm wrote: ```suggestion // Lower an SME LDR/STR ZA

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > contains We already got one check for contains, its readability-container-contains, not sure how it apply for std::string, but maybe instead of calling this check modernize it could be readability, otherwise all checks would be modernize. https://github.com/llvm/llvm-project

[compiler-rt] [llvm] [clang] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-15 Thread Pavel Iliin via cfe-commits
@@ -293,6 +295,7 @@ inline constexpr ExtensionInfo Extensions[] = { {"sme-lutv2", AArch64::AEK_SME_LUTv2, "+sme-lutv2", "-sme-lutv2", FEAT_INIT, "", 0}, {"sme-f8f16", AArch64::AEK_SMEF8F16, "+sme-f8f16", "-sme-f8f16", FEAT_INIT, "+sme2,+fp8", 0}, {"sme-f8f32", AAr

[compiler-rt] [clang] [llvm] [AArch64][SME] Add support for sme-fa64 (PR #70809)

2023-11-15 Thread Pavel Iliin via cfe-commits
@@ -1363,6 +1367,8 @@ static void __init_cpu_features_constructor(unsigned long hwcap, setCPUFeature(FEAT_SME_I64); if (hwcap2 & HWCAP2_SME_F64F64) setCPUFeature(FEAT_SME_F64); + if (hwcap2 & HWCAP2_SME_FA64) +setCPUFeature(FEAT_SME_FA64); ilinp

[clang-tools-extra] [clang-tidy] Add new modernize-string-find-startswith check (PR #72385)

2023-11-15 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: I like `XXX-use-starts-ends-with`. I would rather move it to `performance` than `readability` if not `modernize`. @PiotrZSL thoughts before I go ahead and do the renaming? Also move it somewhere else? https://github.com/llvm/llvm-project/pull/72385 _

[clang] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,469 @@ +//===--- APINotesManager.cpp - Manage API Notes Files -===// +// +// 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,163 @@ +//===--- APINotesManager.h - Manage API Notes Files -*- 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,163 @@ +//===--- APINotesManager.h - Manage API Notes Files -*- 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,163 @@ +//===--- APINotesManager.h - Manage API Notes Files -*- 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -737,6 +737,9 @@ inline bool operator!=(const TypedefInfo &LHS, const TypedefInfo &RHS) { return !(LHS == RHS); } +/// The file extension used for the source representation of API notes. +static const char SOURCE_APINOTES_EXTENSION[] = "apinotes"; compne

[clang] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,163 @@ +//===--- APINotesManager.h - Manage API Notes Files -*- 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,469 @@ +//===--- APINotesManager.cpp - Manage API Notes Files -===// +// +// 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,469 @@ +//===--- APINotesManager.cpp - Manage API Notes Files -===// +// +// 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] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-15 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,469 @@ +//===--- APINotesManager.cpp - Manage API Notes Files -===// +// +// 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

<    1   2   3   4   5   6   >