[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes source location in AliasTemplateDeductionGuideTransform. I don't have a reproducible testcase, but this should be a safe and non-functional change. We have checked the `hasDefaultArg` before calling getDefault

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-24 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @cor3ntin @AaronBallman I can work on reapplying this tomorrow. Do we want a flag that allows _all_ template parameter shadowing as a warning, or only in this particular case? https://github.com/llvm/llvm-project/pull/78274 ___ cfe

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-24 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: The above patch landed after `release/18.x` branched. It drops the check for `CMAKE_SYSTEM_PROCESSOR` as discussed in this thread and only relies on the linker-flag check. This seems to be the right thing to do. I checked on 32-bit Raspbian @ RPi4b: It correctly defaults

[clang] [clang] Incorrect IR involving the use of bcopy (PR #79298)

2024-01-24 Thread via cfe-commits
https://github.com/vojkan99 created https://github.com/llvm/llvm-project/pull/79298 This patch addresses the issue regarding the call of bcopy function in a conditional expression. It is analogous to the already accepted patch which deals with the same problem, just regarding the bzero functio

[clang] [clang] Incorrect IR involving the use of bcopy (PR #79298)

2024-01-24 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it i

[clang] [clang] Incorrect IR involving the use of bcopy (PR #79298)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: None (vojkan99) Changes This patch addresses the issue regarding the call of bcopy function in a conditional expression. It is analogous to the already accepted patch which deals with the same problem, j

[clang] [llvm] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-data-sections (PR #79252)

2024-01-24 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan updated https://github.com/llvm/llvm-project/pull/79252 >From 4999dba02844de0ea2fac843c06b08625bafe494 Mon Sep 17 00:00:00 2001 From: Amy Kwan Date: Tue, 23 Jan 2024 22:19:49 -0600 Subject: [PATCH] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-d

[openmp] [flang] [llvm] [libcxxabi] [libcxx] [mlir] [compiler-rt] [libc] [clang] [clang-tools-extra] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-24 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78637 >From efd07e93aed51049ad3783c701284617ae446330 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 17 Jan 2024 11:11:59 + Subject: [PATCH 1/6] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1

[openmp] [flang] [llvm] [libcxxabi] [libcxx] [mlir] [compiler-rt] [libc] [clang] [clang-tools-extra] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-24 Thread Florian Hahn via cfe-commits
@@ -21471,6 +21471,57 @@ bool isHalvingTruncateOfLegalScalableType(EVT SrcVT, EVT DstVT) { (SrcVT == MVT::nxv2i64 && DstVT == MVT::nxv2i32); } +// Combine store (trunc X to <3 x i8>) to sequence of ST1.b. +static SDValue combineI8TruncStore(StoreSDNode *ST, Selection

[openmp] [flang] [llvm] [libcxxabi] [libcxx] [mlir] [compiler-rt] [libc] [clang] [clang-tools-extra] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-24 Thread Florian Hahn via cfe-commits
fhahn wrote: Updated, comments should be addressed and also updated to use `MachineFunction::getMachineMemOperand` https://github.com/llvm/llvm-project/pull/78637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Docs] Mention RISC-V in the introductory paragraph in ShadowCallStack.rst. (PR #79241)

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

[clang-tools-extra] [clang] [llvm] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-01-24 Thread via cfe-commits
mikaelholmen wrote: Hi, This patch changed ``` BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF") ``` into ``` def StpncpyChk : Builtin { let Spellings = ["__builtin___stpncpy_chk"]; let Attributes = [FunctionWithBuiltinPrefix, NoThrow]; let Prototype = "int(char*, char*, char const*, siz

[lld] [clang] [flang] [llvm] [AMDGPU] Introduce Code Object V6 (PR #76954)

2024-01-24 Thread Konstantin Zhuravlyov via cfe-commits
@@ -2585,7 +2585,7 @@ getAMDGPUCodeObjectArgument(const Driver &D, const llvm::opt::ArgList &Args) { void tools::checkAMDGPUCodeObjectVersion(const Driver &D, const llvm::opt::ArgList &Args) { const unsigned MinCodeObjVer = 4; - cons

[flang] [lld] [llvm] [clang] [AMDGPU] Introduce Code Object V6 (PR #76954)

2024-01-24 Thread Konstantin Zhuravlyov via cfe-commits
@@ -44,8 +44,15 @@ constexpr uint32_t VersionMajorV5 = 1; /// HSA metadata minor version for code object V5. constexpr uint32_t VersionMinorV5 = 2; +/// HSA metadata major version for code object V6. +constexpr uint32_t VersionMajorV6 = 1; +/// HSA metadata minor version for c

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce Code Object V6 (PR #76954)

2024-01-24 Thread Konstantin Zhuravlyov via cfe-commits
@@ -620,6 +620,15 @@ void ScalarBitSetTraits::bitset(IO &IO, BCase(EF_AMDGPU_FEATURE_XNACK_V3); BCase(EF_AMDGPU_FEATURE_SRAMECC_V3); break; +case ELF::ELFABIVERSION_AMDGPU_HSA_V6: kzhuravl wrote: I think we'd need to add a test for this?

[clang] [clang][analyzer] Add function 'fprintf' to StreamChecker. (PR #77613)

2024-01-24 Thread Balazs Benics via cfe-commits
@@ -926,6 +932,49 @@ void StreamChecker::evalFputx(const FnDescription *Desc, const CallEvent &Call, C.addTransition(StateFailed); } +void StreamChecker::evalFprintf(const FnDescription *Desc, +const CallEvent &Call, +

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-24 Thread Konstantin Zhuravlyov via cfe-commits
@@ -253,6 +274,12 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) { case GK_GFX1151: return {11, 5, 1}; case GK_GFX1200: return {12, 0, 0}; case GK_GFX1201: return {12, 0, 1}; + + // Generic targets use the earliest ISA version in their group.

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-24 Thread Konstantin Zhuravlyov via cfe-commits
@@ -520,6 +520,106 @@ Every processor supports every OS ABI (see :ref:`amdgpu-os`) with the following === === = = === === == +Generic processors also exist. They group mult

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-24 Thread Konstantin Zhuravlyov via cfe-commits
@@ -4135,6 +4283,33 @@ Code object V5 metadata is the same as == == = +.. _amdgpu-amdhsa-code-object-metadata-v6: + +Code Object V6 Metadata + +.. warning:: + Code object

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: Thanks! I'll probably take a look in my spare time. Feel free to revert this. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-24 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 updated https://github.com/llvm/llvm-project/pull/77936 >From 7314429a203900a8f555e1b0471fdd4cfd4d8d03 Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Wed, 10 Jan 2024 14:57:04 + Subject: [PATCH 1/8] [Clang][SME] Detect always_inline used with mismatched str

[lldb] [clang] [clang-tools-extra] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

2024-01-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/79302 Reverts llvm/llvm-project#78041 Based on this comment: https://github.com/llvm/llvm-project/pull/78041#issuecomment-1908243345 and the author's nonavailability to get to it quickly, we're reverting (and wil

[lldb] [clang] [clang-tools-extra] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

2024-01-24 Thread Erich Keane via cfe-commits
erichkeane wrote: Waiting on CI bots, then I'll submit this revert, then request this for cherry-pick to the 18 branch. https://github.com/llvm/llvm-project/pull/79302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[lldb] [clang] [clang-tools-extra] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

2024-01-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane ready_for_review https://github.com/llvm/llvm-project/pull/79302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [clang-tools-extra] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

2024-01-24 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff aaa93ce7323332d8290b8f563d4d71689c1094c5 7d1982f62bfc9ec897d8dc8837100c6c2f2de156 --

[clang-tools-extra] [lldb] [clang] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-codegen Author: Erich Keane (erichkeane) Changes Reverts llvm/llvm-project#78041 Based on this comment: https://github.com/llvm/llvm-project/pull/78041#issuecomment-1908243345

[clang] [clang][analyzer] Add function 'fprintf' to StreamChecker. (PR #77613)

2024-01-24 Thread Balázs Benics via cfe-commits
@@ -926,6 +932,49 @@ void StreamChecker::evalFputx(const FnDescription *Desc, const CallEvent &Call, C.addTransition(StateFailed); } +void StreamChecker::evalFprintf(const FnDescription *Desc, +const CallEvent &Call, +

[clang] [clang-tools-extra] [lldb] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

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

[clang] [clang-tools-extra] [lldb] Revert "[c++20] P1907R1: Support for generalized non-type template arguments of scalar type." (PR #79302)

2024-01-24 Thread via cfe-commits
cor3ntin wrote: This is rather unfortunate, I hope we can figure that out quickly https://github.com/llvm/llvm-project/pull/79302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9fc890b - [clang][Parse][NFC] Make a local variable const

2024-01-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-01-24T16:18:39+01:00 New Revision: 9fc890b5a06c5e4a014951a1dd7ad7ba592ceaaf URL: https://github.com/llvm/llvm-project/commit/9fc890b5a06c5e4a014951a1dd7ad7ba592ceaaf DIFF: https://github.com/llvm/llvm-project/commit/9fc890b5a06c5e4a014951a1dd7ad7ba592ceaaf.diff LO

[clang] [clang][analyzer] Add function 'fscanf' to StreamChecker. (PR #78180)

2024-01-24 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: steakhal wrote: > This patch breaks a downstream test, like this: > > ```c++ > void test_fscanf_2() { > FILE *F1 = tmpfile(); > if (!F1) > return; > > int a; > unsigned b; > fscanf(F1, "%d %u", &a, &b); > clang_analyzer_dump_in

[clang-tools-extra] [clang] [llvm] [Docs] Fix running-a-pass-with-opt in doc (PR #79273)

2024-01-24 Thread via cfe-commits
https://github.com/LukeLIN-web converted_to_draft https://github.com/llvm/llvm-project/pull/79273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [flang] [compiler-rt] [clang] [llvm] [libc] [libcxx] [Docs] Fix running-a-pass-with-opt in doc (PR #79273)

2024-01-24 Thread via cfe-commits
https://github.com/LukeLIN-web updated https://github.com/llvm/llvm-project/pull/79273 >From 5bec4cb8a832ace256c69993f12ceae9fddedf85 Mon Sep 17 00:00:00 2001 From: Luke <1263810...@qq.com> Date: Wed, 24 Jan 2024 14:07:31 +0300 Subject: [PATCH] fix CMakeLists.txt in doc --- llvm/docs/WritingAn

[libcxx] [flang] [clang] [libc] [compiler-rt] [llvm] [clang-tools-extra] [Docs] Fix running-a-pass-with-opt in doc (PR #79273)

2024-01-24 Thread via cfe-commits
https://github.com/LukeLIN-web ready_for_review https://github.com/llvm/llvm-project/pull/79273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [flang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

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

[flang] [llvm] [lld] [clang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx approved this pull request. LGTM in general, versioning seems fine; I had a pair of very minor nits/questions, but they're not blocking concerns. Thanks! https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailin

[flang] [llvm] [lld] [clang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-24 Thread Alex Voicu via cfe-commits
@@ -49,6 +49,11 @@ constexpr uint32_t VersionMajorV5 = 1; /// HSA metadata minor version for code object V5. constexpr uint32_t VersionMinorV5 = 2; +/// HSA metadata major version for code object V6. +constexpr uint32_t VersionMajorV6 = 1; +/// HSA metadata minor version for c

[clang] [lld] [llvm] [flang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-24 Thread Alex Voicu via cfe-commits
@@ -139,10 +139,10 @@ bool AMDGPURemoveIncompatibleFunctions::checkFunction(Function &F) { const GCNSubtarget *ST = static_cast(TM->getSubtargetImpl(F)); - // Check the GPU isn't generic. Generic is used for testing only - // and we don't want this pass to interfere

[compiler-rt] [openmp] [llvm] [libcxx] [clang] [mlir] [lld] [HEXAGON] Inlining Division (PR #79021)

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

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-24 Thread via cfe-commits
@@ -1568,19 +1568,37 @@ TryUserDefinedConversion(Sema &S, Expr *From, QualType ToType, // called for those cases. if (CXXConstructorDecl *Constructor = dyn_cast(ICS.UserDefined.ConversionFunction)) { - QualType FromCanon -= S.Context.getCanonic

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-24 Thread via cfe-commits
cor3ntin wrote: @MitalAshok Could you look at that today? Otherwise we need to revert - both in main and in the 18 branch https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-24 Thread Connor Sughrue via cfe-commits
cpsughrue wrote: > Can you please send separate PRs for the Support changes? Yes, I'd be happy to https://github.com/llvm/llvm-project/pull/67562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang][analyzer] Add function 'fprintf' to StreamChecker. (PR #77613)

2024-01-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/77613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balazs Benics via cfe-commits
@@ -778,42 +781,61 @@ void StreamChecker::evalFgetc(const FnDescription *Desc, const CallEvent &Call, assertStreamStateOpened(OldSS); steakhal wrote: At first glance you should be right. However, when I tried it, it didn't break any tests but this one. I p

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/73638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Simplify Clang's description of architecture extensions (PR #79311)

2024-01-24 Thread Anatoly Trosinenko via cfe-commits
https://github.com/atrosinenko created https://github.com/llvm/llvm-project/pull/79311 Core LLVM has AArch64TargetParser.h header describing the mapping from Armv8.x and Armv9.x architecture extensions to the particular list of features that are mandatory for the extension. Clang partially re

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-24 Thread via cfe-commits
cor3ntin wrote: Just this case, so that people can disable it in their code. It's really a backward compatibility/transition period concern. https://github.com/llvm/llvm-project/pull/78274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-24 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/79312 Common parts of some "eval" functions are moved into one function. The non-common parts of the "eval" functions are passed through lambda parameters to the new function. From 62dc7fdb2f86c81af501f7f1255a98d97e

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Common parts of some "eval" functions are moved into one function. The non-common parts of the "eval" functions are passed through lambda parameters to the new function. --- Full diff: htt

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-24 Thread Balázs Kéri via cfe-commits
balazske wrote: Later more functions can be simplified with `evalRWCommon`, probably in a next patch to make the review more simple. https://github.com/llvm/llvm-project/pull/79312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [LinkerWrapper] Do not link device code under a relocatable link (PR #79314)

2024-01-24 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/79314 Summary: A relocatable link through `clang -r` can go through the clang-linker-wrapper if offloading is enabled. This will have the effect of linking the device code and creating the wrapper module. It will then b

[clang] [LinkerWrapper] Do not link device code under a relocatable link (PR #79314)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: A relocatable link through `clang -r` can go through the clang-linker-wrapper if offloading is enabled. This will have the effect of linking the device code and creating the wrapper module. It will th

[clang] [llvm] [FMV] Add alias for FEAT_RDM and change priorities according to ACLE. (PR #79316)

2024-01-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/79316 This patch follows the latest ACLE spec (see PR #279). It adds a name alias for FEAT_RDM and adjusts priorities for FEAT_DOTPROD, FEAT_SM4, FEAT_FP16FML, FEAT_RDM. >From cd0a99001387a64d23d606367a0e08bb88b0bfc

[clang] [llvm] [FMV] Add alias for FEAT_RDM and change priorities according to ACLE. (PR #79316)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes This patch follows the latest ACLE spec (see PR #279). It adds a name alias for FEAT_RDM and adjusts priorities for FEAT_DOTPROD, FEAT_SM4, FEAT_FP16FML, FEAT_RDM. --- Full diff: https://github.co

[libunwind] fc364e2 - [libunwind][doc] Remove reference to Phabricator from the landing page

2024-01-24 Thread Louis Dionne via cfe-commits
Author: Louis Dionne Date: 2024-01-24T11:03:05-05:00 New Revision: fc364e26845ce5529caf9f88abcc5a5531d1f59f URL: https://github.com/llvm/llvm-project/commit/fc364e26845ce5529caf9f88abcc5a5531d1f59f DIFF: https://github.com/llvm/llvm-project/commit/fc364e26845ce5529caf9f88abcc5a5531d1f59f.diff

[clang] [llvm] [clang-tools-extra] [DebugInfo][RemoveDIs] Add a DPValue implementation for instcombine sinking (PR #77930)

2024-01-24 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/77930 >From eabd2a9d6922dd82b59497b769bc0a160e69c811 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 12 Jan 2024 11:06:50 + Subject: [PATCH 1/3] [DebugInfo][RemoveDIs] Add a DPValue implementation for instc

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balázs Kéri via cfe-commits
@@ -778,42 +781,61 @@ void StreamChecker::evalFgetc(const FnDescription *Desc, const CallEvent &Call, assertStreamStateOpened(OldSS); balazske wrote: There should be a same kind of problem with `fread`, or not? (That function was not changed in the recent

[lld] [libcxx] [flang] [clang] [libc] [compiler-rt] [lldb] [llvm] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, // declaration, it is implicitly considered to be constexpr. // FIXME: Only applying this to the first declaration seems problematic, as // simple reorderings can affect the

[lld] [libcxx] [flang] [clang] [libc] [compiler-rt] [lldb] [llvm] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -356,14 +356,7 @@ C++23 implementation status Relaxing some constexpr restrictions https://wg21.link/P2448R2";>P2448R2 - -Clang 17 (Partial) - We do not support outside of defaulted special memeber functions the change that constexpr f

[lld] [libcxx] [flang] [clang] [libc] [compiler-rt] [lldb] [llvm] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Fix] Disable fdefine-target-os-macros for now" (PR #78353)

2024-01-24 Thread via cfe-commits
zmodem wrote: Could you add a release note about this, explaining how it changes the macros and what actions users should take? We've already seen that it broke zlib builds, and we're having issues with libpng too in Chromium (https://crbug.com/1519899), so users are likely to run into this.

[llvm] [clang] [clang] NFC: Remove `{File, Directory}Entry::getName()` (PR #74910)

2024-01-24 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: The `release/18.x` branch has been created. Merging... https://github.com/llvm/llvm-project/pull/74910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6c1dbd5 - [clang] NFC: Remove `{File,Directory}Entry::getName()` (#74910)

2024-01-24 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-01-24T08:41:14-08:00 New Revision: 6c1dbd5359c4336d03b11faeaea8459b421f2c5c URL: https://github.com/llvm/llvm-project/commit/6c1dbd5359c4336d03b11faeaea8459b421f2c5c DIFF: https://github.com/llvm/llvm-project/commit/6c1dbd5359c4336d03b11faeaea8459b421f2c5c.diff L

[clang] [llvm] [clang] NFC: Remove `{File, Directory}Entry::getName()` (PR #74910)

2024-01-24 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/74910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [compiler-rt] [flang] [lldb] [libcxx] [llvm] [libc] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Line 551 in > [99cae9a](https://github.com/llvm/llvm-project/commit/99cae9a44fca4cfbd6ee82f196051cbdf6571fa1) will set DefaultedDestructorIsConstexpr regardless of language mode, which it should not. @cor3ntin , I wonder, since we want to claim it as an extension in earlier

[llvm] [clang] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-01-24 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis ready_for_review https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[pstl] [libcxx] [lldb] [llvm] [compiler-rt] [libunwind] [mlir] [clang-tools-extra] [libc] [flang] [clang] [lld] [openmp] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALL

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

[libc] [lld] [clang] [libunwind] [compiler-rt] [flang] [lldb] [openmp] [libcxx] [mlir] [llvm] [pstl] [clang-tools-extra] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALL

2024-01-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/79238 >From 97b500a7061041b5478b6b1b1094e76140e3d9c3 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 23 Jan 2024 17:53:31 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[libc] [lld] [clang] [libunwind] [compiler-rt] [flang] [lldb] [openmp] [libcxx] [mlir] [llvm] [pstl] [clang-tools-extra] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALL

2024-01-24 Thread Fangrui Song via cfe-commits
MaskRay wrote: Fixed a typo and added an example > ``` > // clang -g > __attribute__((weak)) int symbol; > int *foo() { return &symbol; } > > 0x0023: DW_TAG_variable [2] (0x000c) > ... > DW_AT_location [DW_FORM_exprloc](DW_OP_addrx 0x0) > ```

[libc] [lld] [clang] [libunwind] [compiler-rt] [flang] [lldb] [openmp] [libcxx] [mlir] [llvm] [pstl] [clang-tools-extra] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALL

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

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl commented: A cosmetic suggestion I have would be to replace all instances of `Fake` with `inlinedTrap` to make the purpose clearer. https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commi

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
@@ -1628,6 +1628,27 @@ llvm::DIType *CGDebugInfo::createFieldType( offsetInBits, flags, debugType, Annotations); } +llvm::DISubprogram * +CGDebugInfo::getFakeFuncSubprogram(const std::string &FakeFuncName) { adrian-prantl wr

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
@@ -3416,6 +3437,27 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( +llvm::DebugLoc TrapLocation, StringRef Prefix,

[clang] [llvm] Use unaligned atomic load and stores on x86 (PR #79191)

2024-01-24 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/79191 >From 8550fb675c5da67e0560934001e79ab86ae45b1b 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] Use unaligned atomic lo

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread David Blaikie via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[lldb] [llvm] [libc] [compiler-rt] [libcxx] [flang] [clang-tools-extra] [clang] [lld] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread via cfe-commits
cor3ntin wrote: > @cor3ntin , I wonder, since we want to claim it as an extension in earlier > language modes, should I actually add an option for this extension and set > these flags to this option value, not even language mode? Or is that not > worth it? As long as there is an extension war

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie commented: neat idea (I imagine some debuggers will trip over the space in the inlined name, but seems pretty good) I'd guess sometimes we'll lose the inlined debug info if two of these traps are merged, fwiw - but it's probably relatively robust, apart from that.

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread David Blaikie via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif dwblaikie wrote: Is this necessary? https://github.com/llvm/llvm-project/pull/79230 __

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie edited https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] b801b60 - [clangd] Make sure ninja can clean "ClangdXPC.framework" (#75669)

2024-01-24 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-01-24T09:12:00-08:00 New Revision: b801b607e38ca9113394a918f475e5a521b7ec13 URL: https://github.com/llvm/llvm-project/commit/b801b607e38ca9113394a918f475e5a521b7ec13 DIFF: https://github.com/llvm/llvm-project/commit/b801b607e38ca9113394a918f475e5a521b7ec13.diff L

[clang-tools-extra] [clangd] Make sure ninja can clean "ClangdXPC.framework" (PR #75669)

2024-01-24 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/75669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -681,12 +718,26 @@ renameOutsideFile(const NamedDecl &RenameDecl, llvm::StringRef MainFilePath, ExpBuffer.getError().message()); continue; } +std::string RenameIdentifier = RenameDecl.getNameAsString(); +std::optional Selector = std::nullopt; +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -543,6 +550,45 @@ std::optional checkName(const NamedDecl &RenameDecl, return Result; } +clangd::Range tokenRangeForLoc(ParsedAST &AST, SourceLocation TokLoc, + const SourceManager &SM, + const LangOptions &Lang

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -543,6 +550,45 @@ std::optional checkName(const NamedDecl &RenameDecl, return Result; } +clangd::Range tokenRangeForLoc(ParsedAST &AST, SourceLocation TokLoc, + const SourceManager &SM, + const LangOptions &Lang

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/70053 >From 7cca7a3a6d969318fb8531751f75bb41715c7475 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:05:02 +0200 Subject: [PATCH 1/2] cleanup --- clan

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -543,6 +550,45 @@ std::optional checkName(const NamedDecl &RenameDecl, return Result; } +clangd::Range tokenRangeForLoc(ParsedAST &AST, SourceLocation TokLoc, + const SourceManager &SM, + const LangOptions &Lang

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: For context, we've been using this same trick in the Swift standard library for a long time now, to get a good trade-off between space-efficient code generation and usability for inlineable functions such as the arithmetic `+` operator, which traps on overflow. https://g

[lldb] [pstl] [llvm] [mlir] [libc] [compiler-rt] [libcxx] [openmp] [clang-tools-extra] [clang] [lld] [Driver] Test ignored target-specific options for AMDGPU/NVPTX (PR #79222)

2024-01-24 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,5 @@ +/// Some target-specific options are ignored for GPU, so %clang exits with code 0. +// DEFINE: %{check} = %clang -### -c -mcmodel=medium Artem-B wrote: > Also, what exactly are we checking here? With `-###` CC1 sub-compilations do > not run and

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: I suspect the reason is in the array-to-pointer conversion in `StructuralValue` argument. Maybe this will help someone to invent a fix quickly... https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commi

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -543,6 +550,45 @@ std::optional checkName(const NamedDecl &RenameDecl, return Result; } +clangd::Range tokenRangeForLoc(ParsedAST &AST, SourceLocation TokLoc, + const SourceManager &SM, + const LangOptions &Lang

[lldb] [pstl] [llvm] [mlir] [libc] [compiler-rt] [libcxx] [openmp] [clang-tools-extra] [clang] [lld] [Driver] Test ignored target-specific options for AMDGPU/NVPTX (PR #79222)

2024-01-24 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,5 @@ +/// Some target-specific options are ignored for GPU, so %clang exits with code 0. +// DEFINE: %{check} = %clang -### -c -mcmodel=medium jhuber6 wrote: Probably depends on the option we're testing. We could do both. https://github.com/llvm/llvm

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -746,6 +812,30 @@ void findNearMiss( } // namespace +SymbolRange::SymbolRange(Range R) : Ranges({R}) {} + +SymbolRange::SymbolRange(std::vector Ranges) +: Ranges(std::move(Ranges)) {} + +Range SymbolRange::range() const { return Ranges.front(); } + +bool operator==(con

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balazs Benics via cfe-commits
@@ -778,42 +781,61 @@ void StreamChecker::evalFgetc(const FnDescription *Desc, const CallEvent &Call, assertStreamStateOpened(OldSS); steakhal wrote: The problem should apply to all APIs that potentially write to the passed buffer; including `fread` too.

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: > neat idea (I imagine some debuggers will trip over the space in the inlined > name, but seems pretty good) For spaces specifically there's a multi-decade precedent: Objective-C methods have names like `DW_AT_name ("-[NSObject init:]")` https://github.com/llvm/llvm-pro

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -778,12 +868,44 @@ llvm::Expected rename(const RenameInputs &RInputs) { return makeError(ReasonToReject::NoSymbolFound); if (DeclsUnderCursor.size() > 1) return makeError(ReasonToReject::AmbiguousSymbol); + std::string Placeholder; + // We expect the token under

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread David Goldman via cfe-commits
@@ -778,12 +868,44 @@ llvm::Expected rename(const RenameInputs &RInputs) { return makeError(ReasonToReject::NoSymbolFound); if (DeclsUnderCursor.size() > 1) return makeError(ReasonToReject::AmbiguousSymbol); + std::string Placeholder; + // We expect the token under

[clang] [clang] Incorrect IR involving the use of bcopy (PR #79298)

2024-01-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/79298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2a77d92 - [clang] Incorrect IR involving the use of bcopy (#79298)

2024-01-24 Thread via cfe-commits
Author: Vojislav Tomasevic Date: 2024-01-24T09:39:36-08:00 New Revision: 2a77d92e2e942fb1c7e23b046581531ec464cce5 URL: https://github.com/llvm/llvm-project/commit/2a77d92e2e942fb1c7e23b046581531ec464cce5 DIFF: https://github.com/llvm/llvm-project/commit/2a77d92e2e942fb1c7e23b046581531ec464cce5.

[clang] [clang] Incorrect IR involving the use of bcopy (PR #79298)

2024-01-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/79298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >