[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-12 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. I don't know if anyone else has any preference around the additional mcdc-specific header files, but generally it looks good to me. https://github.com/llvm/llvm-project/pull/81497 ___ cfe-commit

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-12 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Sorry, I left the previous function declaration in the `sema.h`, I have removed it now. https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 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 fc7c79b60ca0846f1cc916b6b04eedd1fc21537e e0eb54954778a9321d520748d63732e2f66bc5c9 --

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/5] [Clang][AArch64] Warn when calling streaming/non-

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && dtemirbulatov wrote: Done. https:

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the cal

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def warn_sme_streaming_caller_pass_args_t

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def warn_sme_streaming_caller_pass_args_t

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void conflicting_state_attrs_preserves_inou

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 4196e998349d663a9a9922937cc4bedbec95fe5f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 12 Feb 2024 13:48:39 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Shilei Tian via cfe-commits
@@ -2730,6 +2749,12 @@ std::optional getInlineEncodingV2I16(uint32_t Literal) { return getInlineEncodingV216(false, Literal); } +// Encoding of the literal as an inline constant for a V_PK_*_BF16 instruction +// or nullopt. +std::optional getInlineEncodingV2BF16(uint32_t Li

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Shilei Tian via cfe-commits
@@ -2660,15 +2660,34 @@ bool isInlinableLiteral16(int16_t Literal, bool HasInv2Pi) { return true; uint16_t Val = static_cast(Literal); - return Val == 0x3C00 || // 1.0 - Val == 0xBC00 || // -1.0 - Val == 0x3800 || // 0.5 - Val == 0xB800 || // -0

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/81514 None >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH] [CLANG] Full support of complex multiplication and division

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Stanislav Mekhanoshin via cfe-commits
@@ -79,17 +79,17 @@ define amdgpu_ps void @test_llvm_amdgcn_fdot2_bf16_bf16_sis( ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:v_mov_b32_e32 v2, s1 ; GFX11-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11-NEXT:v_dot2_bf16_bf16 v2, s0, 0x10001, v2 +; GFX11-NEXT:v_do

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-12 Thread Alexandros Lamprineas via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma labrinea wrote: Right, I didn't know that the resolver

[clang] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the object argument in a member function call. (PR #81400)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400 >From 04e18254efc4f671e0bbd9625c7e994fe47c1636 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 11 Feb 2024 00:07:30 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the obje

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-12 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: FWIW, I think it's okay to change this

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread John McCall via cfe-commits
rjmccall wrote: I talked this over with Mike Ash. I was concerned that Objective-C might allow dynamic class changes that would burn our ability to do this optimization, such as adding ivars during `+initialize`. The existing optimization would work even with a relatively lax runtime as long

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-12 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Thanks for working on this! It's really appreciated. Two follow-up questions: - Is AArch64 support planned soon? - Am I correct in understanding that this missed the LLVM 18 cut, and won't until LLVM 19 in mid-August-ish? https://github.com/llvm/llvm-project/pull/76868 ___

[clang] [llvm] [ARM] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note the corresponding GCC bug is at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99312 (and there was a patch posted but never reviewed; https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566322.html). https://github.com/llvm/llvm-project/pull/81493 _

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/81331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B commented: LGTM with few nits for general and NVPTX parts. https://github.com/llvm/llvm-project/pull/81331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
@@ -2764,6 +2764,37 @@ Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``. Note that even if present, its use may depend on run-time privilege or other OS controlled state. +``__builtin_readsteadycounter`` +-- + +``__builtin_

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
@@ -104,6 +104,7 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { case ISD::ATOMIC_STORE: return "AtomicStore"; case ISD::PCMARKER: return "PCMarker"; case ISD::READCYCLECOUNTER: return "ReadCycleCounter"; +

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I don't really like the whole "sufficiently simple function" thing. It seems fragile. You should be able to just take a arbitrary internal varargs function, rewrite its signature to take a va_list argument, rewrite calls to va_start to make a copy

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

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

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-12 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,701 @@ +//===-- ExpandVariadicsPass.cpp *- 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: Apache

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-12 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 updated https://github.com/llvm/llvm-project/pull/79236 >From 9c40b1151b0673430ff53eb121784724a5b090e5 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Tue, 23 Jan 2024 19:19:00 -0600 Subject: [PATCH 1/3] [AMDGPU] Emit a waitcnt instruction after each memory instruct

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread John McCall via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

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

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread via cfe-commits
AtariDreams wrote: > I talked this over with Mike Ash. I was concerned that Objective-C might > allow dynamic class changes that would burn our ability to do this > optimization, such as adding ivars during `+initialize`. The existing > optimization would work even with a relatively lax runtim

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81331 >From 50c0bacb8c33ff0c3caf5554bd198904839a2d2c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 9 Feb 2024 16:13:42 -0600 Subject: [PATCH] [WIP][LLVM] Add `__builtin_readsteadycounter` intrinsic and buiilt

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
@@ -2764,6 +2764,37 @@ Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``. Note that even if present, its use may depend on run-time privilege or other OS controlled state. +``__builtin_readsteadycounter`` +-- + +``__builtin_

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
@@ -104,6 +104,7 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { case ISD::ATOMIC_STORE: return "AtomicStore"; case ISD::PCMARKER: return "PCMarker"; case ISD::READCYCLECOUNTER: return "ReadCycleCounter"; +

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/3] [clang] Support `__is_trivially_copyable(int()&)==false` IM

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81527 Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call. >From c67d64d7ca5885b03b6e0738d5e237ccbd3ed38a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 12 Feb 2024 12:31:37 -0800 Subje

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this seems to break `-fPIE` builds of clang on Linux with the following: ``` ld.lld: error: undefined symbol: alloca >>> referenced by cc1_main.cpp >>> >>> tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o:(ensureStackAddressSpace()) ``` the call to `al

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call. --- Full diff: https://github.com/llvm/llvm-project/pull/81527.diff 3 Files Affected: - (modified) clang/lib/StaticAnalyzer/Ch

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 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 535da10842c7309e9eeaf9828cf6bb034fecaf16 c67d64d7ca5885b03b6e0738d5e237ccbd3ed38a --

[clang] 73159a9 - [NFC] Refactor fast-math handling for clang driver (#81173)

2024-02-12 Thread via cfe-commits
Author: Andy Kaylor Date: 2024-02-12T12:38:16-08:00 New Revision: 73159a994abcbf82881ee15b0df5cf13c9671f31 URL: https://github.com/llvm/llvm-project/commit/73159a994abcbf82881ee15b0df5cf13c9671f31 DIFF: https://github.com/llvm/llvm-project/commit/73159a994abcbf82881ee15b0df5cf13c9671f31.diff L

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/81173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive mat

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -283,9 +283,23 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo &Op); - QualType getPromotionType(QualType Ty) { + QualType getPromotionType(QualType Ty, bool IsDivOpCode = f

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive mat

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive mat

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive mat

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive mat

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive mat

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @aeubanks Thank you reporting! I'll take a look momentarily https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81527 >From 7596e70e7ed63d881d4754f3f18b9e01f38f176f Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 12 Feb 2024 12:31:37 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe function

[clang] [Clang] Fixes of builtin definitions after PR #68324. (PR #81022)

2024-02-12 Thread via cfe-commits
michele-scandale wrote: > > There are still some differences that I haven't addressed here as they > > might be ok to have: > > ``` > > * `__builtin_rint{,f,l}` were defined with the `const` attribute, now they > > use the `const when FP exceptions are ignored` -- this seems due to the > > def

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/81527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81532)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81532 Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call. >From 7596e70e7ed63d881d4754f3f18b9e01f38f176f Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 12 Feb 2024 12:31:37 -0800 Subje

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81532)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call. --- Full diff: https://github.com/llvm/llvm-project/pull/81532.diff 3 Files Affected: - (modified) clang/lib

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I'll send out a PR to remove that code, and potentially also remove the `#undef alloca` separately https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-12 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/2] [clang] Use separator for large numeric values in overflow dia

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-12 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/3] [clang] Use separator for large numeric values in overflow dia

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: https://github.com/llvm/llvm-project/issues/4885 for why `#undef alloca` was added https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-12 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/4] [clang] Use separator for large numeric values in overflow dia

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %flang -target x86_64-unknown-linux -masm=intel -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-INTEL %s banach-space wrote: 1. Use Fortran style comments :) 2. Missing requires? https://github.com/llvm/llvm-project/pull/81490 ___

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. Nice, thank you! https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/81533 PR #71709 broke the Linux PIE build with `undefined symbol: alloca` errors. With the newly included `clang/Basic/Builtins.h` in that PR, it surfaces an issue with a combination of two previous patches. 26670dc

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arthur Eubanks (aeubanks) Changes PR #71709 broke the Linux PIE build with `undefined symbol: alloca` errors. With the newly included `clang/Basic/Builtins.h` in that PR, it surfaces an issue with a combination of two previous patches. 2

[clang] [clang] Remove #undef alloca (PR #81534)

2024-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/81534 Added in 26670dcba1609574cba5942aff78ff97b567c5f3. >From c659a573a066809473ebb36421e612dcdcda5aef Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Mon, 12 Feb 2024 21:01:39 + Subject: [PATCH] [clang] Rem

[clang] [clang] Remove #undef alloca (PR #81534)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: seeing if Windows CI catches anything https://github.com/llvm/llvm-project/pull/81534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove #undef alloca (PR #81534)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arthur Eubanks (aeubanks) Changes Added in 26670dcba1609574cba5942aff78ff97b567c5f3. --- Full diff: https://github.com/llvm/llvm-project/pull/81534.diff 1 Files Affected: - (modified) clang/include/clang/Basic/Builtins.h (-4) ```

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/81533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %flang -target x86_64-unknown-linux -masm=intel -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-INTEL %s MaskRay wrote: `--target=` for new tests https://github.com/llvm/llvm-project/pull/81490

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.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] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.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] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/80541 ___ 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 new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,43 @@ +//===--- DesignatedInitializers.h ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-use-designated-initializers %t +// RUN: %check_clang_tidy -check-suffixes=,SINGLE-ELEMENT -std=c++17 %s modernize-use-designated-initializers %t \ +// RUN: -- -config="{CheckOptions: [{key: modernize-use-d

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.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] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/80541 From 528ec390e23e6883356606c9acdba3315d5f59bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 3 Feb 2024 13:13:50 +0100 Subject: [PATCH 01/27] Trigger on variable declarations --- .

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/80541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aef36eb - [clang] Remove old Linux kernel workaround for ensuring stack space (#81533)

2024-02-12 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-02-12T13:41:58-08:00 New Revision: aef36ebb3b74c81589885c61b4fc066052dd9498 URL: https://github.com/llvm/llvm-project/commit/aef36ebb3b74c81589885c61b4fc066052dd9498 DIFF: https://github.com/llvm/llvm-project/commit/aef36ebb3b74c81589885c61b4fc066052dd9498.diff

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/81533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile int

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/4] [clang] Support `__is_trivially_copyable(int()&)==fal

[clang] [ObjC] Defer to the LLVM backend for unaligned atomic load and stores (PR #79191)

2024-02-12 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/79191 >From ea42a83c26d6f5d8bd562a2f67586ab90554e539 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:59:05 -0500 Subject: [PATCH] [ObjC] Defer to the LLV

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-02-12 Thread zhijian lin via cfe-commits
@@ -172,6 +172,30 @@ bool PPCSubtarget::enableSubRegLiveness() const { return UseSubRegLiveness; } +void PPCSubtarget::tocDataChecks(unsigned PointerSize, + const GlobalVariable *GV) const { + // TODO: These asserts should be updated as more

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81542 This patch expands notion of "interesting" in `IdentifierInto` it to also cover ObjC keywords and builtins, which matches noting of "interesting" in serialization layer. What was previously "interesting" in `Ide

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Vlad Serebrennikov (Endilll) Changes This patch expands notion of "interesting" in `IdentifierInto` it to also cover ObjC keywords and builtins, which matches noting of "interesting" in serialization layer. What was previously "in

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-12 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/4] [clang] Use separator for large numeric values in overflow dia

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [llvm] [MC/DC] Refactor: Introduce `MCDCTypes.h` for `coverage::mcdc` (PR #81459)

2024-02-12 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81459 >From 03bab9acf5aa3bf13c2223e92dbad040202d34bd Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 12 Feb 2024 18:43:56 +0900 Subject: [PATCH 1/3] [MC/DC] Refactor: Introduce `MCDCTypes.h` for the namespac

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-12 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @evodius96 Thanks. I can wait for other comments for a few days. Considerations: * `MCDCState.h` is enough small to be embeded into `CodeGenPGO.h`. I guess it nasty a bit if I did, though. * `MCDCState.h` involves `CoverageMapping.h`, that is not small. It shall be replaced with

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-02-12 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/81364 >From 9701011a9c88397cf3bb2c089e7295f62c7e13fe Mon Sep 17 00:00:00 2001 From: vvd170501 <36827317+vvd170...@users.noreply.github.com> Date: Sat, 10 Feb 2024 19:19:52 +0300 Subject: [PATCH 1/4] Add -Wmissing-desi

<    1   2   3   4   5   >