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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -3401,6 +3401,40 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// type-qualifier: +///('__ptrauth') '(' constant-expression +/// (',' constant-expression)[opt] +/// (',' constant-expression)[opt] ')' +void Parser::Pars

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -3401,6 +3401,40 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// type-qualifier: +///('__ptrauth') '(' constant-expression +/// (',' constant-expression)[opt] +/// (',' constant-expression)[opt] ')' +void Parser::Pars

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

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I got through the rest of parser and sema, thank you for your patience! I think we should add quite a bit more testing for all the places where types are important in both C and C++; the test coverage we have right now is a good start, but misses a lo

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics %s + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics %s + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -73,7 +73,7 @@ namespace { // value of the expression to the unqualified, non-atomic version of // the named type. if (!S.Context.getLangOpts().ObjC && !DestType->isRecordType() && - !DestType->isArrayType()) { + !DestType->isArrayType

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s + +template struct G { + T __ptrauth(0,0,1234) test; +

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -1549,6 +1549,54 @@ bool Sema::checkConstantPointerAuthKey(Expr *Arg, unsigned &Result) { return false; } +bool Sema::checkPointerAuthDiscriminatorArg(Expr *Arg, +PointerAuthDiscArgKind Kind, +

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

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

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -9531,6 +9533,29 @@ bool SpecialMemberDeletionInfo::shouldDeleteForVariantObjCPtrMember( return true; } +bool SpecialMemberDeletionInfo::shouldDeleteForVariantPtrAuthMember( +FieldDecl *FD, QualType FieldType) { AaronBallman wrote: ```suggestion

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/123667 >From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 20 Jan 2025 22:51:00 +0200 Subject: [PATCH 1/5] [Clang] use constant evaluation context for constexpr if c

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -79,7 +79,7 @@ SPIRVTranslate(Module *M, std::string &SpirvObj, std::string &ErrMsg, if (TargetTriple.getTriple().empty()) { TargetTriple.setTriple(DefaultTriple); -M->setTargetTriple(DefaultTriple); +M->setTargetTriple(Triple(DefaultTriple)); ---

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

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -19370,9 +19376,14 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, RecordArgPassingKind::CanNeverPassInRegs) Record->setArgPassingRestrictions( RecordArgPassingKind::CanNeverPassInRegs); - } else if (F

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

2025-03-05 Thread Fraser Cormack via cfe-commits
@@ -46,9 +46,7 @@ _CLC_DEF _CLC_OVERLOAD __CLC_GENTYPE __clc_hypot(__CLC_GENTYPE x, __CLC_GENTYPE retval = __clc_sqrt(__clc_mad(fx, fx, fy * fy)) * fx_exp; retval = (ux > PINFBITPATT_SP32 || uy == 0) ? __CLC_AS_GENTYPE(ux) : retval; - retval = (ux == PINFBITPATT_SP32 ||

[clang] f8ba0df - [clang][deps] Remove dependency on llvm targets from lib DependencyScanning (#129774)

2025-03-05 Thread via cfe-commits
Author: Ben Langmuir Date: 2025-03-05T08:25:39-08:00 New Revision: f8ba0df8781a9f2d0b54fcd6b06a47a06234a4c4 URL: https://github.com/llvm/llvm-project/commit/f8ba0df8781a9f2d0b54fcd6b06a47a06234a4c4 DIFF: https://github.com/llvm/llvm-project/commit/f8ba0df8781a9f2d0b54fcd6b06a47a06234a4c4.diff

[clang] [clang][deps] Remove dependency on llvm targets from lib DependencyScanning (PR #129774)

2025-03-05 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir closed https://github.com/llvm/llvm-project/pull/129774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-03-05 Thread Sarah Spall via cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) { << TRange << Op->getSourceRange(); } +void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) { + const VectorType *VTy = BaseExpr->getType()->getAs(); + if

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

2025-03-05 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited 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] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129285 >From 7a61f41a3104dd0765dea9930e0cf6f94d656598 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 28 Feb 2025 19:27:41 +0100 Subject: [PATCH 1/3] [Clang][diagnostics] Improve the diagnostics for chained

[clang] [clang][bytecode] Ignore function calls with depth > 0... (PR #129887)

2025-03-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/129887 ... when checking for a potential constant expression. This is also what the current interpreter does. >From 8e4267678319e98b2119233e13b5e73869bc3a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?

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

2025-03-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Thanks :) 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] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/126793 >From cfa6bfb6ae5834f251d8e0c2c0f447aa82c97ef2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 11 Feb 2025 21:30:18 +0100 Subject: [PATCH 1/2] [Clang][ASTMatcher] Improve matching isDerivedFrom base

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

2025-03-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Looks like ready to land, @mmha do you have landing permission? https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7bd492f - [clang dependency scanning] Make Current Working Directory Optimization Off by Default (#129809)

2025-03-05 Thread via cfe-commits
Author: Qiongsi Wu Date: 2025-03-05T09:03:04-08:00 New Revision: 7bd492ffe84b549bc0f3b26e3aab973fa81069a5 URL: https://github.com/llvm/llvm-project/commit/7bd492ffe84b549bc0f3b26e3aab973fa81069a5 DIFF: https://github.com/llvm/llvm-project/commit/7bd492ffe84b549bc0f3b26e3aab973fa81069a5.diff LO

[clang] [clang dependency scanning] Make Current Working Directory Optimization Off by Default (PR #129809)

2025-03-05 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/129809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-05 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > > The comment mentions the additional edges might come through cancellations, > > but what test actually tests cancellation points? > > There is probably no cancellation support at the moment. I remember that you > had a set of patches to enable support for that but

[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: > LGTM, but you should add a release note to `clang/docs/ReleaseNotes.rst` so > users know about the change in behavior. Thank you, I added a release note, once you confirm it's approved I can land after CI is green https://github.com/llvm/llvm-project/pull/126793

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

2025-03-05 Thread Victor Mustya via cfe-commits
vmustya wrote: > That way, header-only extensions don't need to be added to > `OpenCLExtensions.def` @svenvh, in any case, we need a list of all the supported extensions, including the header ones. When someone passes the `-Xclang -cl-ext=+all`, the compiler should add defines for all the sup

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

2025-03-05 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited 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] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-03-05 Thread Ryan Mast via cfe-commits
nightlark wrote: For reviewers, here's a summary of the potential issues that come to mind and what has been done to verify things are working as expected: * The packaging metadata (keywords, name, author/contact info, etc) don't match what we expect - check the pyproject.toml and make sur

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-03-05 Thread Nikita Popov via cfe-commits
nikic wrote: This should be okay from the mesa side now. https://github.com/search?q=%22include+clc%2Fclc.h%22&type=code has some other mentions of clc/clc.h includes, but from a cursory looks all of those look very old. https://github.com/llvm/llvm-project/pull/126908 ___

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

2025-03-05 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > The comment mentions the additional edges might come through cancellations, > but what test actually tests cancellation points? There is probably no cancellation support at the moment. I remember that you had a set of patches to enable support for that but never land

[clang] [clang] Remove isOSWindows() checks (PR #129909)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prabhuk (Prabhuk) Changes The logic to decide which va_start builtin should be used must rely on the ABI information. The target triple based check is rigid. It makes the support for new triples such as x86_64-uefi to add more triple based

[clang] [clang] Remove isOSWindows() checks (PR #129909)

2025-03-05 Thread via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/129909 The logic to decide which va_start builtin should be used must rely on the ABI information. The target triple based check is rigid. It makes the support for new triples such as x86_64-uefi to add more triple base

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

2025-03-05 Thread John McCall via cfe-commits
@@ -73,7 +73,7 @@ namespace { // value of the expression to the unqualified, non-atomic version of // the named type. if (!S.Context.getLangOpts().ObjC && !DestType->isRecordType() && - !DestType->isArrayType()) { + !DestType->isArrayType

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

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman 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] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-03-05 Thread Cristian Le via cfe-commits
LecrisUT wrote: > - The python bindings aren't placed in the right folder to import them when > the package is pip installed They are *not*? I tried it and it imported fine, same as you noticed. > - Installing directly from a git URL or source archives for a release won't > work Similarly,

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

2025-03-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/126793 >From cfa6bfb6ae5834f251d8e0c2c0f447aa82c97ef2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 11 Feb 2025 21:30:18 +0100 Subject: [PATCH 1/3] [Clang][ASTMatcher] Improve matching isDerivedFrom base

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-05 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: > Does s390x have +soft-float or any features that toggle the availability of > float conversion ops? Yes, we support soft-float, and as I wrote earlier I am worried what happens with soft-float and conversion functions. I saw that with soft-float, the same conversion functi

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/129915 Currently `DependencyScanningTool::getModuleDependencies` takes a single `ModuleName` and if we have a list of module names to process for the same compilation, we invoke `getModuleDependencies` multiple time

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu converted_to_draft https://github.com/llvm/llvm-project/pull/129915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiongsi Wu (qiongsiwu) Changes Currently `DependencyScanningTool::getModuleDependencies` takes a single `ModuleName` and if we have a list of module names to process for the same compilation, we invoke `getModuleDependencies` multiple tim

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

2025-03-05 Thread Aaron Ballman 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 Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM 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] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

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

[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] [llvm] [mlir] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

2025-03-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/129868 >From 13e2505e361d7ed462486162a5fe56b904018f65 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 4 Mar 2025 17:04:48 +0100 Subject: [PATCH 1/2] [IR] Store Triple in Module (NFC) The module currently stores t

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

2025-03-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/128184 >From bcf2a4708c3f9ae88f5fddafe02c95533601c887 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 21 Feb 2025 07:14:02 -0800 Subject: [PATCH 1/3] [CLANG-CL] Remove the 'static' declaration specifier

[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] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #129885)

2025-03-05 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/129885 Reverts llvm/llvm-project#127987 Original description: This updates the existing modf[f|l] builtin to be lowered via the llvm.modf.* intrinsic (rather than directly to a library call). The legalization issues e

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #129885)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Benjamin Maxwell (MacDue) Changes Reverts llvm/llvm-project#127987 Original description: This updates the existing modf[f|l] builtin to be lowered via the llvm.modf.* intrinsic (rather than directly to a library call). The legalization i

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

2025-03-05 Thread Ricardo Jesus 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] [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 approved this pull request. LGTM with a nit. Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` for the fix. Also, please add a test for `constexpr` (I believe we handle that correctly, but we might as well make sure we handle all the storage

[clang] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-05 Thread Arvind Sudarsanam via cfe-commits
@@ -78,7 +77,7 @@ class LLVM_LIBRARY_VISIBILITY SPIRVToolChain : public ToolChain { bool useIntegratedAs() const override { return true; } - bool IsIntegratedBackendDefault() const override { return false; } + bool IsIntegratedBackendDefault() const override { return tru

[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 f19e6f6c5da44bd47c71a1b3d047aa1a0df96568 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Wed, 5 Mar 2025 16:36:21 +0100 Subject: [PATCH 1/7] [CIR] Upstream global variable linkage types This change impleme

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-03-05 Thread Ryan Mast via cfe-commits
nightlark wrote: @Endilll - do you have way to contact them directly to tell them about this PR? I suspect they are not seeing any notifications for the mentions here, and will require telling them "in-person" at a meeting. I have a PR (opened >1 month ago) in the repository for the libclang p

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-03-05 Thread Sven van Haastregt via cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) { << TRange << Op->getSourceRange(); } +void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) { + const VectorType *VTy = BaseExpr->getType()->getAs(); + if

[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] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. Other than a potentially erroneous assert this looks good to me. https://github.com/llvm/llvm-project/pull/129732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

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

2025-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman 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

[libclc] 760eeac - [libclc] Reduce bithacking in CLC frexp (#129871)

2025-03-05 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-03-05T14:18:51Z New Revision: 760eeac6a22e49a3100c530dd130a7202ae0a56b URL: https://github.com/llvm/llvm-project/commit/760eeac6a22e49a3100c530dd130a7202ae0a56b DIFF: https://github.com/llvm/llvm-project/commit/760eeac6a22e49a3100c530dd130a7202ae0a56b.diff LOG

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

2025-03-05 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: It's worth noting that alive2 considers this a correct transformation for the before/after IR, for the scalar float/double versions of __clc_frexp for amdgcn. https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing

[clang] [clang][bytecode] Ignore function calls with depth > 0... (PR #129887)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... when checking for a potential constant expression. This is also what the current interpreter does. --- Full diff: https://github.com/llvm/llvm-project/pull/129887.diff 2 Files Affected: - (modified) c

[clang] [llvm] [OpenMP] Parsing/Sema support for self_maps (PR #129888)

2025-03-05 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj created https://github.com/llvm/llvm-project/pull/129888 Support self maps in map and requirement clause [Sections 7.9.6 and 10.5.1.6 in OpenMP 6.0 spec] >From 831fb3cf165814c3a7e437a7839951ef12d51694 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Da

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

2025-03-05 Thread Ricardo Jesus 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] [OpenMP] Parsing/Sema support for self_maps (PR #129888)

2025-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: None (Ritanya-B-Bharadwaj) Changes Support self maps in map and requirement clause [Sections 7.9.6 and 10.5.1.6 in OpenMP 6.0 spec] --- Patch is 28.21 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-

[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 6961d5683a4bc38c2fee053bc956475d0ccb0b80 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] [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] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus 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

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

2025-03-05 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/129871 ___ 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 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] Add support for missing OpenCL extensions (PR #129777)

2025-03-05 Thread Victor Mustya via cfe-commits
vmustya wrote: > 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 gaining by adding them here? @svenvh, I'm trying

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

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

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-05 Thread Ulrich Weigand via cfe-commits
uweigand wrote: I think that compiler-rt should provide all six conversion routines (f16<->f32, f16<->f64, f16<->f128), simply because libgcc has them and GCC-generated code will use them, and compiler-rt is supposed to be usable as drop-in replacement. Also, I think LLVM should ideally genera

[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] use parameter location for abbreviated function templates (PR #129139)

2025-03-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/129139 >From 4ae7fe210d36daa111ba78d1cc26785d805148b6 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 28 Feb 2025 00:41:43 +0200 Subject: [PATCH 1/2] [Clang] use parameter location for abbreviated function te

[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] [Clang] use parameter location for abbreviated function templates (PR #129139)

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

[clang] bdbc434 - [clang][bytecode] Ignore function calls with depth > 0... (#129887)

2025-03-05 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-05T16:21:03+01:00 New Revision: bdbc434498016ee22c06983c8b2725c169326b66 URL: https://github.com/llvm/llvm-project/commit/bdbc434498016ee22c06983c8b2725c169326b66 DIFF: https://github.com/llvm/llvm-project/commit/bdbc434498016ee22c06983c8b2725c169326b66.diff L

[clang] [clang][bytecode] Ignore function calls with depth > 0... (PR #129887)

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

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

2025-03-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. 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] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread David Sherwood via cfe-commits
https://github.com/david-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] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)

2025-03-05 Thread Ricardo Jesus via cfe-commits
@@ -7380,12 +7380,27 @@ 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] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)

2025-03-05 Thread via cfe-commits
@@ -237,6 +237,8 @@ Bug Fixes in This Version when it can affect template argument deduction (#GH122306). - Fix crash on code completion of function calls involving partial order of function templates (#GH125500). +- Non-local variable and non-variable declarations in the

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-03-05 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: It looks that with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33805 mesa is no longer using the libclc headers. https://github.com/llvm/llvm-project/pull/126908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2025-03-05 Thread via cfe-commits
https://github.com/hchandel updated https://github.com/llvm/llvm-project/pull/129504 >From c93d0db7c67ca5bac425b2ecc1579afff93e747a Mon Sep 17 00:00:00 2001 From: Harsh Chandel Date: Wed, 26 Feb 2025 16:52:54 +0530 Subject: [PATCH 1/8] [RISCV] Add Qualcomm uC Xqcibm (Bit Manipulation) extensio

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

2025-03-05 Thread via cfe-commits
@@ -385,6 +389,20 @@ RISCVMCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO, return 0; } +uint64_t +RISCVMCCodeEmitter::getImmOpValueMinus1(const MCInst &MI, unsigned OpNo, +SmallVectorImpl &Fixups, +

[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] [llvm] [RISCV] Add Qualcomm uC Xqcibm (Bit Manipulation) extension (PR #129504)

2025-03-05 Thread via cfe-commits
@@ -90,6 +119,30 @@ class QCIRVInstRR funct5, DAGOperand InTyRs1, string opcodestr> : RVInstR<{0b00, funct5}, 0b011, OPC_CUSTOM_0, (outs GPRNoX0:$rd), (ins InTyRs1:$rs1, GPRNoX0:$rs2), opcodestr, "$rd, $rs1, $rs2">; +class QCIBitManipRII funct3, bits<2> func

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -139,7 +139,7 @@ class Lint : public InstVisitor { Lint(Module *Mod, const DataLayout *DL, AliasAnalysis *AA, AssumptionCache *AC, DominatorTree *DT, TargetLibraryInfo *TLI) - : Mod(Mod), TT(Triple::normalize(Mod->getTargetTriple())), DL(DL), AA(AA), + :

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -91,7 +91,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { } // Set up the module to build for our target. - M->setTargetTriple(TM->getTargetTriple().normalize()); + M->setTargetTriple(Triple(TM->getTargetTriple().normalize()));

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -124,7 +124,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { // Set up target dependant options // - M->setTargetTriple(TM->getTargetTriple().normalize()); + M->setTargetTriple(Triple(TM->getTargetTriple().normalize()));

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -114,7 +114,8 @@ std::unique_ptr llvm::parseInputFile(StringRef Filename, TargetTriple.setTriple(TheTriple.getTriple()); } - Result->setTargetTriple(TargetTriple.getTriple()); // override the triple + // override the triple + Result->setTargetTriple(Triple(TargetT

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -515,12 +515,13 @@ static void splitCodeGen(const Config &C, TargetMachine *TM, static Expected initAndLookupTarget(const Config &C, Module &Mod) { if (!C.OverrideTriple.empty()) -Mod.setTargetTriple(C.OverrideTriple

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

2025-03-05 Thread Matt Arsenault via cfe-commits
@@ -46,9 +46,7 @@ _CLC_DEF _CLC_OVERLOAD __CLC_GENTYPE __clc_hypot(__CLC_GENTYPE x, __CLC_GENTYPE retval = __clc_sqrt(__clc_mad(fx, fx, fy * fy)) * fx_exp; retval = (ux > PINFBITPATT_SP32 || uy == 0) ? __CLC_AS_GENTYPE(ux) : retval; - retval = (ux == PINFBITPATT_SP32 ||

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

2025-03-05 Thread Yingwei Zheng via cfe-commits
@@ -200,7 +200,7 @@ LTOModule::makeLTOModule(MemoryBufferRef Buffer, const TargetOptions &options, return EC; std::unique_ptr &M = *MOrErr; - std::string TripleStr = M->getTargetTriple(); + std::string TripleStr = M->getTargetTriple().str(); dtcxzyw w

[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 members (PR #128866)

2025-03-05 Thread Aaron Ballman via cfe-commits
@@ -5450,10 +5546,25 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); +SourceLocation Location = Constructor->getLo

[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())

<    1   2   3   4   5   >