[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-03-05 Thread via cfe-commits
@@ -5432,6 +5432,9 @@ class Sema final : public SemaBase { void MarkBaseAndMemberDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record); + void MarkBaseDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record);

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus updated https://github.com/llvm/llvm-project/pull/129732 >From 624d1e924aa130eea2a8ddaefaeb587aab642f2f Mon Sep 17 00:00:00 2001 From: Ricardo Jesus Date: Tue, 4 Mar 2025 02:36:06 -0800 Subject: [PATCH 1/5] Precommit tests --- .../AArch64/sve-fixed-length-offsets.l

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread David Sherwood via cfe-commits
@@ -0,0 +1,362 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=128 -aarc

[clang] [clang] Fix crash when #embed data does not fit into an array (PR #129567)

2025-03-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/129567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Assignment Tracking] Replace `undef` debug info with `poison` (PR #129755)

2025-03-05 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/129755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcibm (Bit Manipulation) extension (PR #129504)

2025-03-05 Thread via cfe-commits
@@ -341,6 +341,19 @@ static DecodeStatus decodeUImmOperandGE(MCInst &Inst, uint32_t Imm, return MCDisassembler::Success; } +template +static DecodeStatus decodeUImmPlus1OperandGE(MCInst &Inst, uint32_t Imm, + int64_t Address, +

[clang] 5916903 - [clang] Fix crash when #embed data does not fit into an array (#129567)

2025-03-05 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-03-05T11:04:52+01:00 New Revision: 59169036ca0e064612886713d609873f776e85db URL: https://github.com/llvm/llvm-project/commit/59169036ca0e064612886713d609873f776e85db DIFF: https://github.com/llvm/llvm-project/commit/59169036ca0e064612886713d609873f776e85

[clang] [clang] Fix crash when #embed data does not fit into an array (PR #129567)

2025-03-05 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/16950 Here is the releva

[clang] [clang][bytecode][NFC] Fix getting references to local function ptrs (PR #129852)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is the same thing we do for globals and parameters. --- Full diff: https://github.com/llvm/llvm-project/pull/129852.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-1) ``

[clang-tools-extra] [clangd] gitignore index directories (PR #90305)

2025-03-05 Thread Sumit Sahrawat via cfe-commits
https://github.com/sumit-sahrawat closed https://github.com/llvm/llvm-project/pull/90305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread David Sherwood via cfe-commits
https://github.com/david-arm approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/129732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose potential size confusion with VLA params (PR #129772)

2025-03-05 Thread via cfe-commits
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +// Loop over the parameters to see if any of the size expressions contains cor3ntin wrote: Can we - Put all of that in a separate function -

[clang] Diagnose potential size confusion with VLA params (PR #129772)

2025-03-05 Thread via cfe-commits
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +// Loop over the parameters to see if any of the size expressions contains +// a DeclRefExpr which refers to a variable from an outer scope that is +//

[clang] Diagnose potential size confusion with VLA params (PR #129772)

2025-03-05 Thread via cfe-commits
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +// Loop over the parameters to see if any of the size expressions contains +// a DeclRefExpr which refers to a variable from an outer scope that is +//

[clang] Diagnose potential size confusion with VLA params (PR #129772)

2025-03-05 Thread via cfe-commits
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +// Loop over the parameters to see if any of the size expressions contains +// a DeclRefExpr which refers to a variable from an outer scope that is +//

[clang] [Clang] Add support for missing OpenCL extensions (PR #129777)

2025-03-05 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh requested changes to this pull request. What is the motivation for this change? We are trying to move away from adding extensions to this file for extensions that only add builtin functions, see e.g. https://reviews.llvm.org/D92231 . What functionality are you gainin

[clang] clang: Regenerate test checks (PR #129834)

2025-03-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/129834 The previous checks missed the new metadata at the end of the line. Regenerate to avoid future spurious diffs. >From 677c5bdaecc01020e00abd1814701680091fa367 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: W

[clang] [clang] Fix crash when #embed data does not fit into an array (PR #129567)

2025-03-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/129567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash when #embed data does not fit into an array (PR #129567)

2025-03-05 Thread via cfe-commits
cor3ntin wrote: Thanks for the fix! https://github.com/llvm/llvm-project/pull/129567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-03-05 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/129072 >From 1432050465c1e351edfdfe908de52d1d6d1cf15e Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Mon, 3 Mar 2025 18:44:40 +0100 Subject: [PATCH 1/7] [CIR] Upstream global variable linkage types This change impleme

[clang] [CLANG-CL] Remove the 'static' specifier for _FUNCTION_ in MSVC mode. (PR #128184)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -747,8 +747,10 @@ std::string PredefinedExpr::ComputeName(PredefinedIdentKind IK, if (const CXXMethodDecl *MD = dyn_cast(FD)) { if (MD->isVirtual() && IK != PredefinedIdentKind::PrettyFunctionNoVirtual) Out << "virtual "; - if (MD->isStatic()) -

[clang] [llvm] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: This change is about 20 years overdue https://github.com/llvm/llvm-project/pull/129868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG-CL] Remove the 'static' specifier for _FUNCTION_ in MSVC mode. (PR #128184)

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/128184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. I haven't spent much time looking at this one, because we have instructions for the two halves https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Sema] Instantiate destructors for initialized members (PR #128866)

2025-03-05 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 edited https://github.com/llvm/llvm-project/pull/128866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus updated https://github.com/llvm/llvm-project/pull/129732 >From 624d1e924aa130eea2a8ddaefaeb587aab642f2f Mon Sep 17 00:00:00 2001 From: Ricardo Jesus Date: Tue, 4 Mar 2025 02:36:06 -0800 Subject: [PATCH 1/7] Precommit tests --- .../AArch64/sve-fixed-length-offsets.l

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-03-05 Thread via cfe-commits
@@ -5863,6 +5869,26 @@ Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, &DirectVirtualBases); } +void Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, +

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus updated https://github.com/llvm/llvm-project/pull/129732 >From 624d1e924aa130eea2a8ddaefaeb587aab642f2f Mon Sep 17 00:00:00 2001 From: Ricardo Jesus Date: Tue, 4 Mar 2025 02:36:06 -0800 Subject: [PATCH 1/4] Precommit tests --- .../AArch64/sve-fixed-length-offsets.l

[clang] clang: Do not implicitly addrspacecast in EmitAggExprToLValue (PR #129837)

2025-03-05 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh approved this pull request. https://github.com/llvm/llvm-project/pull/129837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-05 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/129285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Fix getting references to local function ptrs (PR #129852)

2025-03-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/129852 This is the same thing we do for globals and parameters. >From 9f71da5ed2b6dfa7ec26b1b0b5a51a713edeee4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 5 Mar 2025 10:01:39 +0100 Subject

[clang] Diagnose potential size confusion with VLA params (PR #129772)

2025-03-05 Thread via cfe-commits
@@ -10333,6 +10334,74 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +// Loop over the parameters to see if any of the size expressions contains +// a DeclRefExpr which refers to a variable from an outer scope that is +//

[clang] [llvm] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -189,8 +190,10 @@ class LLVM_ABI Module { std::string ModuleID; ///< Human readable identifier for the module std::string SourceFileName; ///< Original source file name for module, ///< recorded in bitcode. - std::string T

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
@@ -7380,17 +7380,31 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexedSVE(SDNode *Root, SDValue N, return false; SDValue VScale = N.getOperand(1); - if (VScale.getOpcode() != ISD::VSCALE) + std::optional MulImm; + if (VScale.getOpcode() == ISD::VSCALE) { +MulImm

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcibm (Bit Manipulation) extension (PR #129504)

2025-03-05 Thread via cfe-commits
@@ -333,6 +397,59 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { } // hasSideEffects = 0, mayLoad = 0, mayStore = 0 } // Predicates = [HasVendorXqcia, IsRV32] +let Predicates = [HasVendorXqcibm, IsRV32] in { +let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { +

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #129234)

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

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #129234)

2025-03-05 Thread Gábor Horváth via cfe-commits
@@ -443,21 +443,44 @@ class reverse_children { } // namespace -reverse_children::reverse_children(Stmt *S) { - if (CallExpr *CE = dyn_cast(S)) { -children = CE->getRawSubExprs(); +reverse_children::reverse_children(Stmt *S, ASTContext &Ctx) { + switch (S->getStmtClass()

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
@@ -0,0 +1,362 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=128 -aarc

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-03-05 Thread Maurice Heumann via cfe-commits
@@ -5432,6 +5432,9 @@ class Sema final : public SemaBase { void MarkBaseAndMemberDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record); + void MarkBaseDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record);

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
@@ -0,0 +1,362 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=128 -aarc

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
@@ -7380,17 +7380,31 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexedSVE(SDNode *Root, SDValue N, return false; SDValue VScale = N.getOperand(1); - if (VScale.getOpcode() != ISD::VSCALE) + std::optional MulImm; + if (VScale.getOpcode() == ISD::VSCALE) { +MulImm

[clang] ea15e8b - [C++20] [Modules] Avoid use-but-not-defined error

2025-03-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-05T19:05:49+08:00 New Revision: ea15e8b16eacdf2fb3a9715c5fc753b62fdfd516 URL: https://github.com/llvm/llvm-project/commit/ea15e8b16eacdf2fb3a9715c5fc753b62fdfd516 DIFF: https://github.com/llvm/llvm-project/commit/ea15e8b16eacdf2fb3a9715c5fc753b62fdfd516.diff LO

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #129234)

2025-03-05 Thread Gábor Horváth via cfe-commits
@@ -180,3 +183,58 @@ int test_reference_that_might_be_after_the_end(int idx) { return ref; } +// From: https://github.com/llvm/llvm-project/issues/100762 +extern int arrOf10[10]; +void using_builtin(int x) { + __builtin_assume(x > 101); // CallExpr + arrOf10[x] = 404; // e

[clang] [llvm] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Nikita Popov (nikic) Changes The module currently stores the target triple as a string. This means that any code that wants to actually use the triple first has to instantiate a Triple, which is somewhat expensive. The change in #12

[clang] [llvm] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Nikita Popov (nikic) Changes The module currently stores the target triple as a string. This means that any code that wants to actually use the triple first has to instantiate a Triple, which is somewhat expensive. The change in

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-05 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/129871 Also replace some magic constants with named ones. Checking against FP zero and using isnan and isinf functions allows the optimizer to create one unified @llvm.is.fpclass intrinsic. This results in fewer

[clang] [llvm] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/129868 The module currently stores the target triple as a string. This means that any code that wants to actually use the triple first has to instantiate a Triple, which is somewhat expensive. The change in #121652 caus

[libclc] [libclc] Reduce bithacking for INF/NAN values (PR #129738)

2025-03-05 Thread Fraser Cormack via cfe-commits
@@ -86,13 +84,10 @@ _CLC_DEF _CLC_OVERLOAD __CLC_GENTYPE __clc_hypot(__CLC_GENTYPE x, r = c ? s : r; // Check for NaN - c = __clc_isnan(x) || __clc_isnan(y); - r = c ? __CLC_AS_GENTYPE((__CLC_ULONGN)QNANBITPATT_DP64) : r; + r = __clc_isnan(x) || __clc_isnan(y) ? __CLC_

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] use parameter location for abbreviated function templates (PR #129139)

2025-03-05 Thread via cfe-commits
@@ -7991,8 +7991,12 @@ Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) { // have C linkage. DeclContext *Ctx = S->getEntity(); if (Ctx && Ctx->isExternCContext()) { -Diag(TemplateParams->getTemplateLoc(), diag::err_template_linkage) -

[clang] clang: Do not implicitly addrspacecast in EmitAggExprToLValue (PR #129837)

2025-03-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx requested changes to this pull request. I'm temporarily blocking this to go through a bit more than OCL - I just want to ensure that this doesn't break some C/C++ corner case. Otherwise LGTM. https://github.com/llvm/llvm-project/pull/129837 ___

[clang] d1bcac0 - [Clang] Bump `__cpp_constexpr` to `202002L` in C++20 mode (#129814)

2025-03-05 Thread via cfe-commits
Author: A. Jiang Date: 2025-03-05T18:25:06+08:00 New Revision: d1bcac06c7c11699e7931bb7315a1bb9b9784179 URL: https://github.com/llvm/llvm-project/commit/d1bcac06c7c11699e7931bb7315a1bb9b9784179 DIFF: https://github.com/llvm/llvm-project/commit/d1bcac06c7c11699e7931bb7315a1bb9b9784179.diff LOG:

[clang] [Clang] Bump `__cpp_constexpr` to `202002L` in C++20 mode (PR #129814)

2025-03-05 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja closed https://github.com/llvm/llvm-project/pull/129814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Fix getting references to local function ptrs (PR #129852)

2025-03-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/129852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3fed3bf - [clang][bytecode][NFC] Fix getting references to local function ptrs (#129852)

2025-03-05 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-05T11:26:43+01:00 New Revision: 3fed3bfef2f620d9423733298ee1e99d6c7d3068 URL: https://github.com/llvm/llvm-project/commit/3fed3bfef2f620d9423733298ee1e99d6c7d3068 DIFF: https://github.com/llvm/llvm-project/commit/3fed3bfef2f620d9423733298ee1e99d6c7d3068.diff L

[clang] [Clang] use parameter location for abbreviated function templates (PR #129139)

2025-03-05 Thread Oleksandr T. via cfe-commits
@@ -7991,8 +7991,12 @@ Sema::CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams) { // have C linkage. DeclContext *Ctx = S->getEntity(); if (Ctx && Ctx->isExternCContext()) { -Diag(TemplateParams->getTemplateLoc(), diag::err_template_linkage) -

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
@@ -0,0 +1,362 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -aarch64-sve-vector-bits-min=128 -aarc

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus edited https://github.com/llvm/llvm-project/pull/129732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-03-05 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/128732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-03-05 Thread via cfe-commits
GoodenoughPhysicsLab wrote: This patch is extremely useful, I want it can be merged. https://github.com/llvm/llvm-project/pull/96417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][cleanup] simplify ReachableCode scanFromBlock (PR #72257)

2025-03-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/72257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #129234)

2025-03-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/129234 >From 67d6420eb64949b9639385a8a2f647db0d05d078 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 1 Feb 2025 10:03:27 +0100 Subject: [PATCH 1/4] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_as

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #129234)

2025-03-05 Thread Balazs Benics via cfe-commits
@@ -443,21 +443,44 @@ class reverse_children { } // namespace -reverse_children::reverse_children(Stmt *S) { - if (CallExpr *CE = dyn_cast(S)) { -children = CE->getRawSubExprs(); +reverse_children::reverse_children(Stmt *S, ASTContext &Ctx) { + switch (S->getStmtClass()

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
@@ -7380,17 +7380,31 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexedSVE(SDNode *Root, SDValue N, return false; SDValue VScale = N.getOperand(1); - if (VScale.getOpcode() != ISD::VSCALE) + std::optional MulImm; + if (VScale.getOpcode() == ISD::VSCALE) { +MulImm

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-03-05 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 edited https://github.com/llvm/llvm-project/pull/128866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -7157,7 +7157,7 @@ def note_precedence_conditional_first : Note< "place parentheses around the '?:' expression to evaluate it first">; def warn_consecutive_comparison : Warning< - "comparisons like 'X<=Y<=Z' don't have their mathematical meaning">, + "comparisons like '

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
@@ -7380,12 +7380,26 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexedSVE(SDNode *Root, SDValue N, return false; SDValue VScale = N.getOperand(1); - if (VScale.getOpcode() != ISD::VSCALE) + int64_t MulImm = std::numeric_limits::max(); + if (VScale.getOpcode() == ISD

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
@@ -405,6 +405,17 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo { return MinSVEVectorSizeInBits; } + // Return the known bit length of SVE data registers. A value of 0 means the + // length is unkown beyond what's implied by the architecture. + uns

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/129732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-03-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @cor3ntin do you sustain an objection due to the lack of a full beginner-friendly test case reduction tutorial? https://github.com/llvm/llvm-project/pull/124997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

2025-03-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Ping. I'll merge tomorrow if there are no further objections. https://github.com/llvm/llvm-project/pull/126088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Instantiate destructors for initialized members (PR #128866)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -5283,6 +5283,102 @@ Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor, return false; } +static void MarkFieldDestructorReferenced(Sema &S, SourceLocation Location, + FieldDecl *Field) { + if (Field->isInvalidDecl())

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/129285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Please fix MLIR build failure. https://github.com/llvm/llvm-project/pull/129868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-03-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @cor3ntin do you sustain an objection due to the lack of a full > beginner-friendly test case reduction tutorial? I think this PR is improvement over status quo, but I see where Corentin is coming from with his objection. Maybe the middle ground would be to explicitly acknowl

[clang] [flang] [llvm] [mlir] [mlir][OpenMP] fix crash outlining infinite loop (PR #129872)

2025-03-05 Thread Tom Eccles via cfe-commits
tblah wrote: > The comment mentions the additional edges might come through cancellations, > but what test actually tests cancellation points? Thanks for taking a look. Now I have added clang lit tests (including for cancel) we can see that there are no changes beyond block names and removing

[clang] [flang] [llvm] [mlir] [mlir][OpenMP] fix crash outlining infinite loop (PR #129872)

2025-03-05 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/129872 >From 3055b89b8ab937bfd4ba70d87e1733b05156d0ac Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 4 Mar 2025 17:19:53 + Subject: [PATCH 1/2] [mlir][OpenMP] fix crash outlining infinite loop Previously an ex

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-05 Thread via cfe-commits
choikwa wrote: > > There were some stakeholders who are trying to compile cccl on AMDGPU and > > were looking for a solution in clang. If this short term fix isn't > > desirable, is there any alternative solutions to explore? I understand long > > term solution keeping it as libcall and having

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-03-05 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q

[clang] [HLSL] Fix resrouce wrapper declaration (PR #129100)

2025-03-05 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/129100 >From 1e794cd4b79235282795891f943f8f4609738d4f Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 4 Feb 2025 11:47:42 -0500 Subject: [PATCH 1/6] [HLSL] Fix resrouce wrapper declaration The resource wrappe

[clang] [analyzer] Add more C++ list initializer tests and regroup (PR #129182)

2025-03-05 Thread Michael Flanders via cfe-commits
https://github.com/Flandini updated https://github.com/llvm/llvm-project/pull/129182 >From 6db1434c459854ca6ea631fc33e0f773323e85d0 Mon Sep 17 00:00:00 2001 From: Michael Flanders Date: Sun, 23 Feb 2025 13:09:39 -0600 Subject: [PATCH 1/2] [analyzer] Add more C++ list initializer tests and regr

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-05 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/127290 >From 3e6122744f355954edb6a5450ae4220ba39bc9c1 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 14 Feb 2025 16:53:33 -0800 Subject: [PATCH 1/3] [clang] Fix UEFI Target info For X64 UEFI targets, making the in

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -7141,6 +7141,9 @@ def warn_shift_result_sets_sign_bit : Warning< "signed shift result (%0) sets the sign bit of the shift expression's " "type (%1) and becomes negative">, InGroup>, DefaultIgnore; +def warn_shift_bool : Warning< + "right shifting a `bool` implicitly

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -11247,6 +11247,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult &LHS, ExprResult &RHS, if (S.getLangOpts().OpenCL) return; + if (Opc == BO_Shr && + LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) { +S.Diag(Loc, diag::warn_shift_bo

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #127116)

2025-03-05 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/127116 >From b5b9b158e7e379f2d430584e3ccf519677bf27a3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 10 Jan 2025 17:13:30 -0800 Subject: [PATCH 1/5] [Clang][counted_by] Add support for 'counted_by' on struc

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: @AaronBallman If releasenote is okey, i can merge now :D https://github.com/llvm/llvm-project/pull/126793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-03-05 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/128815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix resource wrapper declaration (PR #129100)

2025-03-05 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/129100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6d4f8b1 - [HLSL] Fix resource wrapper declaration (#129100)

2025-03-05 Thread via cfe-commits
Author: Steven Perron Date: 2025-03-05T14:02:39-05:00 New Revision: 6d4f8b1dbfd21811351bec205154992afddbc5ea URL: https://github.com/llvm/llvm-project/commit/6d4f8b1dbfd21811351bec205154992afddbc5ea DIFF: https://github.com/llvm/llvm-project/commit/6d4f8b1dbfd21811351bec205154992afddbc5ea.diff

[clang] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)

2025-03-05 Thread via cfe-commits
@@ -10794,6 +10794,23 @@ def err_non_local_variable_decl_in_for : Error< "declaration of non-local variable in 'for' loop">; def err_non_variable_decl_in_for : Error< "non-variable declaration in 'for' loop">; + +def ext_c23_non_local_variable_decl_in_for : Extension< -

[clang] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)

2025-03-05 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/129737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -361,6 +361,8 @@ Fixed Point Support in Clang AST Matchers +- Ensure ``isDerivedFrom`` is matching the correct base in case of more than one aliases exists. AaronBallman wrote: ```suggestion - Ensure ``isDerivedFrom`` matches the correct base

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/126793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Just a minor rewording, feel free to land once you've made the changes. https://github.com/llvm/llvm-project/pull/126793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)

2025-03-05 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/129737 >From f0605e803b6e7748913515a4b0ffe34fa7eedc24 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 4 Mar 2025 17:36:30 +0100 Subject: [PATCH 1/2] [Clang] Allow non-local/non-variable declarations in for loop -

[clang] [Sema] Instantiate destructors for initialized members (PR #128866)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -5283,6 +5283,102 @@ Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor, return false; } +static void MarkFieldDestructorReferenced(Sema &S, SourceLocation Location, + FieldDecl *Field) { + if (Field->isInvalidDecl())

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-03-05 Thread Maurice Heumann via cfe-commits
@@ -5863,6 +5869,26 @@ Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, &DirectVirtualBases); } +void Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location, +

[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
@@ -405,6 +405,17 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo { return MinSVEVectorSizeInBits; } + // Return the known bit length of SVE data registers. A value of 0 means the + // length is unkown beyond what's implied by the architecture. + uns

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -8395,6 +8410,68 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, CurType = S.Context.getVectorType(CurType, numElts, VecKind); } +/// Handle the __ptrauth qualifier. +static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T, +

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-03-05 Thread Oleksandr T. via cfe-commits
@@ -11246,6 +11246,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult &LHS, ExprResult &RHS, if (S.getLangOpts().OpenCL) return; + if (LHS.get()->IgnoreParenImpCasts()->getType()->isBooleanType()) { +S.Diag(Loc, diag::warn_shift_bool) +<< (Opc ==

  1   2   3   4   5   >