[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin converted_to_draft https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix initializing base casts (PR #104901)

2024-08-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104901 Use delegate() there. To fix a follow-up problem, abort when a cast ends up on a valid Pointer that isn't a base class. >From cd2cc98cecc1f237da4a2aa30a9c07b07ae4c804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-20 Thread Daniel Cederman via cfe-commits
doac wrote: Thank you for your comments! https://github.com/llvm/llvm-project/pull/104742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-20 Thread Daniel Cederman via cfe-commits
https://github.com/doac updated https://github.com/llvm/llvm-project/pull/104742 >From a68dec7b074afdc003c63e721cd384c9c6721610 Mon Sep 17 00:00:00 2001 From: Daniel Cederman Date: Mon, 19 Aug 2024 08:17:36 +0200 Subject: [PATCH 1/3] [Sparc] Add flags to enable errata workaround pass for GR712R

[clang] [clang][bytecode] Fix initializing base casts (PR #104901)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Use delegate() there. To fix a follow-up problem, abort when a cast ends up on a valid Pointer that isn't a base class. --- Full diff: https://github.com/llvm/llvm-project/pull/104901.diff 3 Files Affected

[clang-tools-extra] c29aba7 - [clang-doc] add support for block commands in clang-doc html output (#101108)

2024-08-20 Thread via cfe-commits
Author: PeterChou1 Date: 2024-08-20T03:58:47-04:00 New Revision: c29aba7159473c5fc225d4aea75647939497e3ac URL: https://github.com/llvm/llvm-project/commit/c29aba7159473c5fc225d4aea75647939497e3ac DIFF: https://github.com/llvm/llvm-project/commit/c29aba7159473c5fc225d4aea75647939497e3ac.diff LO

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-20 Thread via cfe-commits
https://github.com/PeterChou1 closed https://github.com/llvm/llvm-project/pull/101108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [NFC] Cleanup in Support headers. (PR #104825)

2024-08-20 Thread Nikita Popov via cfe-commits
nikic wrote: > For reference: [compile-time-tracker > run](https://llvm-compile-time-tracker.com/compare.php?from=82fdfd4aa7f60b1f8e715211b925a7f2bfe57ea9&to=70b88a21f2c8bc26a0178c6ae9aa2b0834e8&stat=instructions%3Au) > with the change (please check the instructions:u for "clang build" at t

[clang] [lld] [llvm] [NFC] Cleanup in Support headers. (PR #104825)

2024-08-20 Thread Nikita Popov via cfe-commits
nikic wrote: Best guess on how this could happen: Something depends on a no longer included macro via `#if defined`. https://github.com/llvm/llvm-project/pull/104825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang] Add `__builtin_experimental_vectorcompress` (PR #102476)

2024-08-20 Thread Lawrence Benson via cfe-commits
lawben wrote: Makes sense. I'll try to add the logic for the reamining SVE types in the next few days. I've been working on x86 instruction selection for this. I'll wait with this PR until both ARM and x86 are supported. https://github.com/llvm/llvm-project/pull/102476

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread YunQiang Su via cfe-commits
wzssyqa wrote: I figure out another use case: ``` f: fadd.w $w0,$w1,$w2 ``` ``` # ./bin/clang --target=mipsel-linux-gnu -mfp64 -Wa,-mmsa -fintegrated-as -c xx.s xx.s:2:2: error: instruction requires a CPU feature not currently enabled fadd.w $w0,$w1,$w2 ^ ``` ``` # ./

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > I figure out another use case: > > ``` > f: > fadd.w $w0,$w1,$w2 > ``` > > ``` > # ./bin/clang --target=mipsel-linux-gnu -mfp64 -Wa,-mmsa -fintegrated-as -c > xx.s > xx.s:2:2: error: instruction requires a CPU feature not currently enabled > fadd.w $w0,$w1,

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/104906 In the current lifetime analysis, we have two parallel code paths: one for lifetimebound and another for GSL. These paths perform the same logic, both determining whether to continue visiting subexpressions. Th

[clang] [X86][AVX10] Fix unexpected error and warning when using intrinsic (PR #104781)

2024-08-20 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/104781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-20 Thread Nikolas Klauser via cfe-commits
@@ -3327,6 +3330,15 @@ def DiagnoseIf : InheritableAttr { let Documentation = [DiagnoseIfDocs]; } +def DiagnoseSpecializations : InheritableAttr { + let Spellings = [Clang<"diagnose_specializations", /*AllowInC*/0>]; + let Args = [StringArgument<"Message", 1>]; ---

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-20 Thread Nikolas Klauser via cfe-commits
@@ -3327,6 +3330,15 @@ def DiagnoseIf : InheritableAttr { let Documentation = [DiagnoseIfDocs]; } +def DiagnoseSpecializations : InheritableAttr { + let Spellings = [Clang<"diagnose_specializations", /*AllowInC*/0>]; philnik777 wrote: Do explicit specializ

[clang] [X86][AVX10] Fix unexpected error and warning when using intrinsic (PR #104781)

2024-08-20 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/104781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread via cfe-commits
yingopq wrote: > > I figure out another use case: > > ``` > > f: > > fadd.w $w0,$w1,$w2 > > ``` > > > > > > > > > > > > > > > > > > > > > > > > ``` > > # ./bin/clang --target=mipsel-linux-gnu -mfp64 -Wa,-mmsa -fintegrated-as -c > > xx.s > > x

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-08-20 Thread Jiaxun Yang via cfe-commits
FlyGoat wrote: Yes, such usage is required by FFmpeg https://github.com/llvm/llvm-project/pull/99615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix discarding CompoundLiteralExprs (PR #104909)

2024-08-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104909 None >From 6d45a286525465b4832e4ee01fa747db871f002e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 Aug 2024 11:02:25 +0200 Subject: [PATCH] [clang][bytecode] Fix discarding Compound

[clang] [clang][bytecode] Fix discarding CompoundLiteralExprs (PR #104909)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/104909.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+3-3) - (modified) clang/test/AST/ByteCode/c23.c (+4-1) ```

[clang] 522c253 - [Coroutines] Salvage the debug information for coroutine frames within optimizations

2024-08-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-20T17:21:43+08:00 New Revision: 522c253f47ea27d8eeb759e06f8749092b1de71e URL: https://github.com/llvm/llvm-project/commit/522c253f47ea27d8eeb759e06f8749092b1de71e DIFF: https://github.com/llvm/llvm-project/commit/522c253f47ea27d8eeb759e06f8749092b1de71e.diff LO

[clang] [clang-forma] Support `PointerAlignment` for pointers to members (PR #86253)

2024-08-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Hi folks, I am a little confused about the behavior introduced by this patch. I was expecting `Foo::*` in `Type Foo::* name` to be treated as a single entity and whole thing to be aligned with `name` or spaced away from it, Rather than splitting `*` . To add some more from the

[clang] [clang][bytecode] Fix initializing base casts (PR #104901)

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

[clang] ba7dadf - [clang][bytecode] Fix initializing base casts (#104901)

2024-08-20 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-20T11:44:30+02:00 New Revision: ba7dadf0e918cbb0e6867d78aebd0cc3fc843bcc URL: https://github.com/llvm/llvm-project/commit/ba7dadf0e918cbb0e6867d78aebd0cc3fc843bcc DIFF: https://github.com/llvm/llvm-project/commit/ba7dadf0e918cbb0e6867d78aebd0cc3fc843bcc.diff L

[clang] [Clang][test] Add bytecode interpreter tests for floating comparison functions (PR #104703)

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

[clang] f1b6427 - [Clang][test] Add bytecode interpreter tests for floating comparison functions (#104703)

2024-08-20 Thread via cfe-commits
Author: Mital Ashok Date: 2024-08-20T11:45:33+02:00 New Revision: f1b642775f11c6defd06eea64df22a465b46a0ce URL: https://github.com/llvm/llvm-project/commit/f1b642775f11c6defd06eea64df22a465b46a0ce DIFF: https://github.com/llvm/llvm-project/commit/f1b642775f11c6defd06eea64df22a465b46a0ce.diff L

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/104512 >From 8e11c66e4515bb35671853b89152b43d1ff60ffa Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 15 Aug 2024 14:03:57 -0700 Subject: [PATCH 1/3] [RFC][C++20][Modules] Fix crash when function and lambd

[clang] [clang][bytecode] Fix initializing base casts (PR #104901)

2024-08-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/4371 Here is the relevant

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 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 059e7be2d1e4397fd40ecaaf913b8a4bfe759779 70a504833bfb540b54bbbe86e8065cf22bdf286b --e

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/104512 >From 8e11c66e4515bb35671853b89152b43d1ff60ffa Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 15 Aug 2024 14:03:57 -0700 Subject: [PATCH 1/4] [RFC][C++20][Modules] Fix crash when function and lambd

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/104512 >From 8e11c66e4515bb35671853b89152b43d1ff60ffa Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 15 Aug 2024 14:03:57 -0700 Subject: [PATCH 1/4] [RFC][C++20][Modules] Fix crash when function and lambd

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-20 Thread via cfe-commits
https://github.com/cor3ntin commented: I like the general idea - I would prefer this to be called `no_specializations` or `disallow_specializations` - I would like to see more tests to what it can mor cannot be applied to (for example an explicit specialization, a variable template, an alias

[clang] [lld] [llvm] [NFC] Cleanup in Support headers. (PR #104825)

2024-08-20 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov updated https://github.com/llvm/llvm-project/pull/104825 >From cce13227c78d3d1831fb8773fc52005fabd412c6 Mon Sep 17 00:00:00 2001 From: dfukalov Date: Mon, 19 Aug 2024 20:02:52 +0200 Subject: [PATCH 1/4] [NFC] Cleanup in Support headers. Remove unused directly includ

[clang] [Clang][NFCI] Cleanup the fix for default function substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/104911 (This is one step towards tweaking getTemplateInstantiationArgs() as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a functio

[clang] [clang][NFC] order C++ standards in reverse in release notes (PR #104866)

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

[clang] [lld] [llvm] [NFC] Cleanup in Support headers. (PR #104825)

2024-08-20 Thread Sergei Barannikov via cfe-commits
@@ -17,7 +17,7 @@ #ifndef LLVM_SUPPORT_ATOMIC_H #define LLVM_SUPPORT_ATOMIC_H -#include "llvm/Support/DataTypes.h" +#include s-barannikov wrote: ```suggestion #include ``` https://github.com/llvm/llvm-project/pull/104825 ___

[clang] [lld] [llvm] [NFC] Cleanup in Support headers. (PR #104825)

2024-08-20 Thread Sergei Barannikov via cfe-commits
@@ -13,7 +13,7 @@ #ifndef LLVM_SUPPORT_CRC_H #define LLVM_SUPPORT_CRC_H -#include "llvm/Support/DataTypes.h" +#include s-barannikov wrote: ```suggestion #include ``` https://github.com/llvm/llvm-project/pull/104825 _

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Gábor Horváth via cfe-commits
@@ -478,13 +449,32 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, CheckCoroObjArg = false; if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg) VisitLifetimeBoundArg(Callee, ObjectArg); +else if (EnableLifetime

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-20 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit -Wdangling diagnoses for cases where a gsl-pointer is construct from a gsl-owner object in a container. (PR #104556)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
@@ -344,9 +347,11 @@ static void handleGslAnnotatedTypes(IndirectLocalPath &Path, Expr *Call, break; } } -Path.push_back({Value ? IndirectLocalPathEntry::GslPointerInit - : IndirectLocalPathEntry::GslReferenceInit, -

[clang] [clang] Emit -Wdangling diagnoses for cases where a gsl-pointer is construct from a gsl-owner object in a container. (PR #104556)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. https://github.com/llvm/llvm-project/pull/104556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit -Wdangling diagnoses for cases where a gsl-pointer is construct from a gsl-owner object in a container. (PR #104556)

2024-08-20 Thread Utkarsh Saxena via cfe-commits
@@ -360,29 +365,26 @@ static void handleGslAnnotatedTypes(IndirectLocalPath &Path, Expr *Call, if (auto *MCE = dyn_cast(Call)) { const auto *MD = cast_or_null(MCE->getDirectCallee()); if (MD && shouldTrackImplicitObjectArg(MD)) - VisitPointerArg(MD, MCE->getImpl

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
@@ -3760,6 +3765,9 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) || (O->isIndeterminate() && !isValidIndeterminateAccess(handler.AccessKind))) { + // O

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread Mital Ashok via cfe-commits
@@ -17264,3 +17288,76 @@ bool Expr::tryEvaluateStrLen(uint64_t &Result, ASTContext &Ctx) const { EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantFold); return EvaluateBuiltinStrLen(this, Result, Info); } + +namespace { +struct IsWithinLifetimeHandler { + EvalInfo &Info; +

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-20 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From accdc9bee5a6f2ee2add330dd8d06d280cd13b64 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/8] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-20 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From accdc9bee5a6f2ee2add330dd8d06d280cd13b64 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/8] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang] b986438 - [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (#104872)

2024-08-20 Thread via cfe-commits
Author: Ian Anderson Date: 2024-08-20T03:29:11-07:00 New Revision: b9864387d9d00e1d4888181460d05dbc92364d75 URL: https://github.com/llvm/llvm-project/commit/b9864387d9d00e1d4888181460d05dbc92364d75 DIFF: https://github.com/llvm/llvm-project/commit/b9864387d9d00e1d4888181460d05dbc92364d75.diff

[clang] [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (PR #104872)

2024-08-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/104872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/104911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/104911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3b49d27 - [X86] Add clang codegen test coverage for #104848

2024-08-20 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-08-20T11:51:28+01:00 New Revision: 3b49d274e6f16d1c8db5f4557eb7866a4bafffa5 URL: https://github.com/llvm/llvm-project/commit/3b49d274e6f16d1c8db5f4557eb7866a4bafffa5 DIFF: https://github.com/llvm/llvm-project/commit/3b49d274e6f16d1c8db5f4557eb7866a4bafffa5.diff

[clang] 6dcce42 - [X86] Use correct fp immediate types in _mm_set_ss/sd

2024-08-20 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-08-20T11:51:29+01:00 New Revision: 6dcce422ca06601f2b00e85cc18c745ede245ca6 URL: https://github.com/llvm/llvm-project/commit/6dcce422ca06601f2b00e85cc18c745ede245ca6 DIFF: https://github.com/llvm/llvm-project/commit/6dcce422ca06601f2b00e85cc18c745ede245ca6.diff

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/104911 >From c8b8360fe046d38452f71479368c21e217468ddb Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Aug 2024 17:18:35 +0800 Subject: [PATCH 1/2] [Clang][NFCI] Cleanup the fix for default function substitut

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/104911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes (This is one step towards tweaking `getTemplateInstantiationArgs()` as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a fu

[clang] [lld] [llvm] [NFC] Cleanup in Support headers. (PR #104825)

2024-08-20 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov updated https://github.com/llvm/llvm-project/pull/104825 >From cce13227c78d3d1831fb8773fc52005fabd412c6 Mon Sep 17 00:00:00 2001 From: dfukalov Date: Mon, 19 Aug 2024 20:02:52 +0200 Subject: [PATCH 1/5] [NFC] Cleanup in Support headers. Remove unused directly includ

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
@@ -285,7 +286,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); -

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/104911 >From c8b8360fe046d38452f71479368c21e217468ddb Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Aug 2024 17:18:35 +0800 Subject: [PATCH 1/3] [Clang][NFCI] Cleanup the fix for default function substitut

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Changes LGTM modulo nits, but please also add a release note to `clang/docs/ReleaseNotes.rst` so users know about the fix. https://github.com/llvm/llvm-project/pull/104857 ___ cfe-commits mai

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-20 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -O3 -ffp-contract=fast-honor-pragmas -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s + +float fp_contract_1(float a, float b, float c) { + // CHECK-LABEL: fp_contract_1fff( + // CHECK: fmul contract float + // CHECK: fadd cont

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/104857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-20 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,151 @@ +// RUN: %clang_cc1 -O3 -ffp-contract=fast-honor-pragmas -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s + +float fp_contract_on_1(float a, float b, float c) { + // CHECK-LABEL: fp_contract_on_1fff( + // CHECK: call float @llvm.fmuladd.f32(float

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-20 Thread via cfe-commits
@@ -1959,9 +2064,12 @@ multiclass VCMLA_ROTS { let isLaneQ = 1 in { // vcmla{ROT}_laneq + // ACLE specifies that the fp16 vcmla_#ROT_laneq variant has an immedaite range of 0 <= lane <= 1. + // fp16 is the only variant for which these two differ. + /

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-20 Thread via cfe-commits
@@ -1959,9 +2064,12 @@ multiclass VCMLA_ROTS { let isLaneQ = 1 in { // vcmla{ROT}_laneq + // ACLE specifies that the fp16 vcmla_#ROT_laneq variant has an immedaite range of 0 <= lane <= 1. + // fp16 is the only variant for which these two differ. + /

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-20 Thread via cfe-commits
https://github.com/zmodem commented: Just some nits from my side. (I only looked at the docs and driver code) https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

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

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-20 Thread via cfe-commits
@@ -3034,6 +3034,12 @@ def fms_extensions : Flag<["-"], "fms-extensions">, Group, Visibility<[ClangOption, CC1Option, CLOption]>, HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">, MarshallingInfoFlag>, ImpliedByAnyOf<[fms_compatibilit

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-20 Thread via cfe-commits
@@ -950,12 +950,14 @@ static void TranslatePermissive(Arg *A, llvm::opt::DerivedArgList &DAL, const OptTable &Opts) { DAL.AddFlagArg(A, Opts.getOption(options::OPT__SLASH_Zc_twoPhase_)); DAL.AddFlagArg(A, Opts.getOption(options::OPT_fno_oper

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-20 Thread via cfe-commits
@@ -7272,6 +7272,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fdelayed-template-parsing"); } + if (Args.hasFlag(options::OPT_fms_reference_binding, + options::OPT_fno_ms_reference_binding, +

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-20 Thread via cfe-commits
@@ -5821,3 +5821,33 @@ specify the starting offset to begin embedding from. The resources is treated as being empty if the specified offset is larger than the number of bytes in the resource. The offset will be applied *before* any ``limit`` parameters are applied. + +MSVC Ext

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-08-20 Thread via cfe-commits
@@ -8492,6 +8498,12 @@ def _SLASH_Zc_wchar_t : CLFlag<"Zc:wchar_t">, HelpText<"Enable C++ builtin type wchar_t (default)">; def _SLASH_Zc_wchar_t_ : CLFlag<"Zc:wchar_t-">, HelpText<"Disable C++ builtin type wchar_t">; +def _SLASH_Zc_referenceBinding : CLFlag<"Zc:referenceBi

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: > Here is another example that merging lambdas are problematic: #102721. > Although I think we need to solve the problems separately. They are different > problems. Thank you for the reference, we need this fix too. > But the current patch still smells bad. Let's try to find

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin ready_for_review https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-20 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-20 Thread Sam Elliott via cfe-commits
lenary wrote: Failures seem unrelated. Merging. https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3f25f23 - [X86][AVX10] Fix unexpected error and warning when using intrinsic (#104781)

2024-08-20 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-08-20T19:56:19+08:00 New Revision: 3f25f23a2b8aaff300e751d4724a3ddba4d694eb URL: https://github.com/llvm/llvm-project/commit/3f25f23a2b8aaff300e751d4724a3ddba4d694eb DIFF: https://github.com/llvm/llvm-project/commit/3f25f23a2b8aaff300e751d4724a3ddba4d694eb.diff L

[clang] [X86][AVX10] Fix unexpected error and warning when using intrinsic (PR #104781)

2024-08-20 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/104781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 39e3085 - [clang][NFC] Split invalid-cpu-note tests (#104601)

2024-08-20 Thread via cfe-commits
Author: Sam Elliott Date: 2024-08-20T12:56:49+01:00 New Revision: 39e3085a55880dbbc5aeddc3661342980d5e1467 URL: https://github.com/llvm/llvm-project/commit/39e3085a55880dbbc5aeddc3661342980d5e1467 DIFF: https://github.com/llvm/llvm-project/commit/39e3085a55880dbbc5aeddc3661342980d5e1467.diff L

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-20 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-20 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/101261 >From 2666871e019dee2314933cc60bcb4ca27d7555ba Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Tue, 30 Jul 2024 19:31:41 -0400 Subject: [PATCH] [clang] Improve diagnostics with incompatible VLA types --- ..

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-20 Thread via cfe-commits
@@ -1959,9 +2064,12 @@ multiclass VCMLA_ROTS { let isLaneQ = 1 in { // vcmla{ROT}_laneq + // ACLE specifies that the fp16 vcmla_#ROT_laneq variant has an immedaite range of 0 <= lane <= 1. + // fp16 is the only variant for which these two differ. + /

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-20 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/101261 >From 5df72d9e8e89079b2c5312583e66756c048e5abe Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Tue, 30 Jul 2024 19:31:41 -0400 Subject: [PATCH] [clang] Improve diagnostics with incompatible VLA types --- cl

[clang] [llvm] [RISCV] Add Hazard3 Core as taped out for RP2350 (PR #102452)

2024-08-20 Thread Sam Elliott via cfe-commits
lenary wrote: The commit this was stacked on is merged, and I think we have sorted out naming issues and pinned down the exact cpu configuration, so I think this is ready for review and merge. https://github.com/llvm/llvm-project/pull/102452 ___ cfe-

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-20 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/101261 >From 6f1868ec7aebf24cfd61472a1a33f6bd65ebeeb5 Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Tue, 30 Jul 2024 19:31:41 -0400 Subject: [PATCH] [clang] Improve diagnostics with incompatible VLA types --- cl

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-20 Thread Janek van Oirschot via cfe-commits
@@ -68,82 +71,84 @@ void MCResourceInfo::assignMaxRegs() { assignMaxRegSym(MaxSGPRSym, MaxSGPR); } -void MCResourceInfo::finalize() { - assert(!finalized && "Cannot finalize ResourceInfo again."); - finalized = true; - assignMaxRegs(); +void MCResourceInfo::finalize(MCCon

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-20 Thread Andrew Sukach via cfe-commits
sookach wrote: Sorry for taking so long, but the new commit handles the diagnostic a little differently. I store the text types in temporary strings and then append a message to the diagnostic if the texts are identical. https://github.com/llvm/llvm-project/pull/101261

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-20 Thread Andrew Sukach via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void func(int n) { +int grp[n][n]; +int (*ptr)[n]; + +for (int i = 0; i < n; i++) +ptr = &grp[i]; // expected-error {{incompatible assignment of pointers of variable-length array type 'int (*)[n]'

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-20 Thread Andrew Sukach via cfe-commits
https://github.com/sookach updated https://github.com/llvm/llvm-project/pull/101261 >From 1de106f82720ea6c470ce6c974c19f966599b9cc Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Tue, 30 Jul 2024 19:31:41 -0400 Subject: [PATCH] [clang] Improve diagnostics with incompatible VLA types --- cl

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-20 Thread via cfe-commits
@@ -1959,9 +2064,12 @@ multiclass VCMLA_ROTS { let isLaneQ = 1 in { // vcmla{ROT}_laneq + // ACLE specifies that the fp16 vcmla_#ROT_laneq variant has an immedaite range of 0 <= lane <= 1. + // fp16 is the only variant for which these two differ. + /

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-20 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/104917 >From c8b31f1e1d1d30cb8523772d3fd15a0358c540d6 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 20 Aug 2024 04:37:20 -0700 Subject: [PATCH 1/2] [RISC-V] Make EmitRISCVCpuSupports accept multiple features This

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-20 Thread Matt Arsenault via cfe-commits
@@ -68,82 +71,84 @@ void MCResourceInfo::assignMaxRegs() { assignMaxRegSym(MaxSGPRSym, MaxSGPR); } -void MCResourceInfo::finalize() { - assert(!finalized && "Cannot finalize ResourceInfo again."); - finalized = true; - assignMaxRegs(); +void MCResourceInfo::finalize(MCCon

[clang] [llvm] [RISCV] Add Hazard3 Core as taped out for RP2350 (PR #102452)

2024-08-20 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/102452 >From b125071eeb35ee4a76e126967b7c29d86a1fae56 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Fri, 16 Aug 2024 07:52:53 -0700 Subject: [PATCH 1/2] [clang][test] Split invalid-cpu-note tests This change does tw

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-20 Thread Matt Arsenault via cfe-commits
@@ -2,12 +2,12 @@ // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx908 -Rpass-analysis=kernel-resource-usage -S -O0 -verify %s -o /dev/null // expected-remark@+10 {{Function Name: foo}} -// expected-remark@+9 {{SGPRs: 13}} -// expected-remark@+8 {{VGPRs: 10

[clang] [Clang][NFCI] Cleanup the fix for default function argument substitution (PR #104911)

2024-08-20 Thread via cfe-commits
cor3ntin wrote: Can you keep the tests as is? Otherwise it's hard to trust this is really NFC. I have some concerns over the number of booleans we are adding to these functions, did you consider an enum or a less easy to miss use interface? https://github.com/llvm/llvm-project/pull/104911 _

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. LGTM. Thanks. I had to double check, but it looks like the LIT test `ffp-contract-fast-honor-pragma-option.cpp` has the same behavior with and without this patch. Right? Aren't there already tests that check the output of the option? ht

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-20 Thread via cfe-commits
@@ -17310,3 +17332,83 @@ bool Expr::tryEvaluateStrLen(uint64_t &Result, ASTContext &Ctx) const { EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantFold); return EvaluateBuiltinStrLen(this, Result, Info); } + +namespace { +struct IsWithinLifetimeHandler { + EvalInfo &Info; +

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-20 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/101962 >From 14f3cb82f0d7e69261bd7e1317bd66392e9a2c2b Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Mon, 5 Aug 2024 11:50:18 +0100 Subject: [PATCH 1/7] [MC] Emit a jump table size section This patch will make LLVM e

  1   2   3   4   >