[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-11 Thread Helena Kotas via cfe-commits
@@ -89,14 +99,57 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( RecordTypes.pop_back(); for (const auto *FD : RT->getDecl()->fields()) { - assert((!Packoffsets || Index < Packoffsets->size()) && - "number of elements in layout stru

[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

2025-03-11 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/130882 When the flag is empty, the opt command won't modify the bitcode; however, the command is slow for large bitcode files in debug mode. >From 1727cb49ebbee324ecad0a766ec341eb1aed082b Mon Sep 17 00:00:00 2001 Fro

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-11 Thread Brad Smith via cfe-commits
@@ -101,6 +101,8 @@ Changes to the LoongArch Backend Changes to the MIPS Backend --- +* `-mcpu=i6400` and `-mcpu=i6500` was added. brad0 wrote: Were instead of was. https://github.com/llvm/llvm-project/pull/130587

[clang] [llvm] AMDGPU: Implement bitcode autoupgrade for old style enqueue blocks (PR #128520)

2025-03-11 Thread Matt Arsenault via cfe-commits
arsenm wrote: Not bothering with this https://github.com/llvm/llvm-project/pull/128520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Avoid repeated hash lookups (NFC) (PR #130888)

2025-03-11 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/130888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clangd][WIP] Add doxygen parsing using standalone doxygen parser (PR #128591)

2025-03-11 Thread via cfe-commits
https://github.com/tcottin updated https://github.com/llvm/llvm-project/pull/128591 >From 1af93ca8fe54daf111b00ff62e9ef70cf2b97b53 Mon Sep 17 00:00:00 2001 From: Tim Cottin Date: Tue, 11 Mar 2025 20:08:32 + Subject: [PATCH] [clangd] Add doxygen parsing for hover information --- clang-tool

[clang] [Clang] Fix the printout of CXXParenListInitExpr involving default arguments (PR #130731)

2025-03-11 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM, I am a bit discouraged that this did not alter an tests. https://github.com/llvm/llvm-project/pull/130731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-03-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/124844 >From da30f708caee020677675277673e0b7c6f9c644f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 Jan 2025 15:15:17 +0400 Subject: [PATCH 01/15] [clang] Diagnose default arguments defined in differe

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-11 Thread via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : + Template<["int", "long int", "long long int"], + ["_nuw", "l_nuw", "ll_nuw"]>; macurtis-amd wrote: Th

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

2025-03-11 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > So this should already work. If it doesn't, you'll have to debug the build > process here (e.g. look at preprocessed output to see what's actually going > on here). Ah, sorry, now I see what's going on. In this line you added to the cmake logic: ``` set(s390x_SOURCES ${GENE

[clang] [Clang] Make `MangleContext::mangleMSGuidDecl()`, `MangleContext::mangleObjCMethodName()` and `MangleContext::mangleObjCMethodNameAsSourceName()` const methods (PR #130613)

2025-03-11 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/130613 Unfortunately, making `MangleContext::mangleName()` would require a lot of const escapes due to lazy initialization and id creations: `Mangle.h`: * https://github.com/llvm/llvm-project/blob/dffbc030e75b758e7

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Todo: - [x] Adapt the bytecode interpreter to the new evaluation model - [x] Tests for CG & Constant evaluation - [x] Release notes With this patch, the example shown in https://gcc.godbolt.org/z/3h74oq8zW

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -603,6 +606,64 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter, }); } +// The unreachable code is not lowered by applyPartialConversion function +// since it traverses blocks in the dominance order. At the same time we +// do need to lower such cod

[clang] 9e64fc6 - [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (#130729)

2025-03-11 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-11T12:47:13-07:00 New Revision: 9e64fc6fb7d9a1ea9fe59d82380219508aee649f URL: https://github.com/llvm/llvm-project/commit/9e64fc6fb7d9a1ea9fe59d82380219508aee649f DIFF: https://github.com/llvm/llvm-project/commit/9e64fc6fb7d9a1ea9fe59d82380219508aee649f.diff

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

2025-03-11 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/130729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

2025-03-11 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/130729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fdc8e5a - [Clang][AArch64] Fix typo with colon-separated syntax for system registers (#105608)

2025-03-11 Thread via cfe-commits
Author: Robert Dazi Date: 2025-03-10T12:05:41Z New Revision: fdc8e5ab62318ff39832cbca2056044a9d45bfe0 URL: https://github.com/llvm/llvm-project/commit/fdc8e5ab62318ff39832cbca2056044a9d45bfe0 DIFF: https://github.com/llvm/llvm-project/commit/fdc8e5ab62318ff39832cbca2056044a9d45bfe0.diff LOG: [

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-03-11 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/128641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-03-11 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann closed https://github.com/llvm/llvm-project/pull/129113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 701148f - [CIR] Upstream initial support for CIR flattening (#130648)

2025-03-11 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-03-11T15:47:02-07:00 New Revision: 701148f05a7b90ed6b8c4fc38db4c2b0c9241ffc URL: https://github.com/llvm/llvm-project/commit/701148f05a7b90ed6b8c4fc38db4c2b0c9241ffc DIFF: https://github.com/llvm/llvm-project/commit/701148f05a7b90ed6b8c4fc38db4c2b0c9241ffc.diff L

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-11 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/130648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-11 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/129939 >From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 4 Mar 2025 09:53:56 -0800 Subject: [PATCH 01/10] extra scalar vector overloads for clamp --- .../lib/Headers/h

[clang] [llvm] [Support] Do not remove lock file on failure (PR #130834)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130834 >From 834eac8d3ce286172456e2a177d0e5284ade5b46 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 11 Mar 2025 09:17:50 -0700 Subject: [PATCH 1/2] [Support] Do not remove lock file on failure --- clang/

[clang] [llvm] [HLSL][NFC] Update resource metadata tests to not use obsolete annotations (PR #130222)

2025-03-11 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][NFC] Update resource metadata tests to not use obsolete annotations (PR #130222)

2025-03-11 Thread Tex Riddell via cfe-commits
https://github.com/tex3d unassigned https://github.com/llvm/llvm-project/pull/130222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/4] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/130447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-11 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/128519 >From dbc5b3d20a4b1f989670e0b03c2a498695449313 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 23 Dec 2022 16:55:40 -0500 Subject: [PATCH 1/2] AMDGPU: Move enqueued block handling into clang The previou

[clang] [llvm] Reapply "[AArch64][SVE] Improve fixed-length addressing modes. (#130263)" (PR #130625)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Ricardo Jesus (rj-jesus) Changes This restores commit f01e760c08365426de95f02dc2c2dc670eb47352. The original patch from #129732 exposed what seems to be a bug in `SelectAddrModeIndexedSVE`. Currently, the offset returned by `Se

[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-03-11 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/122103 From c11ace708fab316f422e12cf9785a5a362d7250c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Thu, 28 Nov 2024 15:00:56 +0100 Subject: [PATCH 1/2] [SPIR-V] Add hlsl_private address space for

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/130847 This change adds the essential support for sizeof and alignof operators - Support for VariableArrayType can be added after closing #130197 >From 337b23e5ddb8ad9ef470e9c62d6fc136ccb070ee Mon Sep 17 00:00:0

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Amr Hesham via cfe-commits
@@ -369,6 +369,22 @@ BoolType::getABIAlignment(const ::mlir::DataLayout &dataLayout, return 1; } +//===--===// +// Definitions +//===--==

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -4024,32 +4026,50 @@ QualType ASTContext::getRValueReferenceType(QualType T) const { return QualType(New, 0); } -/// getMemberPointerType - Return the uniqued reference to the type for a -/// member pointer to the specified type, in the specified class. -QualType ASTCont

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-11 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,144 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t -- -config="{CheckOptions: {bugprone-capturing-this-by-field.FunctionWrapperTypes: '::std::function;::Fn'}}" -- HerrCai0907 wrote: Unfortunately, I am not f

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-11 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,144 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t -- -config="{CheckOptions: {bugprone-capturing-this-by-field.FunctionWrapperTypes: '::std::function;::Fn'}}" -- + +namespace std { + +template +class function; --

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

2025-03-11 Thread Eisuke Kawashima via cfe-commits
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94029 >From a1256602c10df2beb7b244a75e75c22b7203ea02 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 11 May 2024 02:39:21 +0900 Subject: [PATCH] fix(clang/**.py): fix invalid escape sequences --- clang/docs

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-11 Thread Helena Kotas via cfe-commits
@@ -89,14 +99,57 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( RecordTypes.pop_back(); for (const auto *FD : RT->getDecl()->fields()) { - assert((!Packoffsets || Index < Packoffsets->size()) && - "number of elements in layout stru

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -2002,6 +2014,9 @@ class Declarator { /// this declarator as a parameter pack. SourceLocation EllipsisLoc; + /// The source location of the _Export keyword on this declarator AaronBallman wrote: ```suggestion /// The source location of the _Export k

[clang] [Clang] Allow devirtualization involving array subscripts with constant indices when the pointee type is known (PR #130528)

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

[clang] Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -759,13 +759,11 @@ Sema::BuildDependentDeclRefExpr(const CXXScopeSpec &SS, TemplateArgs); } -bool Sema::DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, - NamedDecl *Instantiation, -

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-11 Thread Sarah Spall via cfe-commits
spall wrote: I need to add more tests for certain odd cases. https://github.com/llvm/llvm-project/pull/129939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-11 Thread Matheus Izvekov via cfe-commits
@@ -5172,8 +5179,28 @@ QualType::DestructionKind QualType::isDestructedTypeImpl(QualType type) { return DK_none; } +bool MemberPointerType::isSugared() const { + CXXRecordDecl *D1 = getMostRecentCXXRecordDecl(), +*D2 = getQualifier()->getAsRecordDecl(); +

[clang] Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-03-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Should this come with a release note as well? https://github.com/llvm/llvm-project/pull/129031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

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

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

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

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-03-11 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -ast-dump %s | FileCheck %s + +// Ensure volatile is preserved during derived-to-base conversion. antoniofrighetto wrote: Added, thanks! `__ptrauth` is in the process of being upstreamed, whereas `_A

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Hide the `TargetOptions` pointer from `CompilerInvocation` (PR #106271)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/106271 >From e4c1f9254257c92789a924c70b06399c0ea794bd Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 27 Aug 2024 09:34:01 -0700 Subject: [PATCH 1/6] [clang] `TargetInfo` does not own `TargetOptions` --- c

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

2025-03-11 Thread John McCall 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] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/130690 >From b9a55d112998c468cce5cabff33939e4412e7ded Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Mon, 10 Mar 2025 16:18:34 -0700 Subject: [PATCH 1/2] [CIR] Upstream CastOp and scalar conversions This patch upstrea

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

2025-03-11 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 7c580893ea662b513da71a3da9ae4ab1b2dafc6b f816923106973a49d940217407c38812c205435c --e

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,12 @@ +// REQUIRES: systemz-registered-target +// RUN: %clang_cc1 -x c++ -emit-llvm -triple s390x-none-zos -fvisibility=hidden %s -o - | FileCheck %s +// expected-no-diagnostics AaronBallman wrote: There's no `-verify` line, so this comment doesn't do

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -7502,6 +7502,27 @@ attribute requires a string literal argument to identify the handle being releas }]; } +def zOSExportDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +Use the _Export keyword with a function name or external variable to dec

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -2110,6 +2126,18 @@ class Declarator { Range.setEnd(SR.getEnd()); } + /// Set this declarator as _Export AaronBallman wrote: ```suggestion /// Set this declarator as _Export. ``` I'll stop commenting on these now, can you take a pass over all th

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. Thanks for this! Some things that are missing: * a release note in `clang/docs/ReleaseNotes.rst` * Parsing and Sema tests Also, it looks like these are two separate (but related) features, one for the pragma and another fo

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -1401,6 +1417,164 @@ bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, return true; } +NestedNameSpecifier *Parser::zOSParseIdentifier(StringRef PragmaName, +IdentifierInfo *IdentName) { + NestedNameSpecifier *Nes

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,12 @@ +// REQUIRES: systemz-registered-target +// RUN: %clang_cc1 -emit-llvm -triple s390x-none-zos -fvisibility=hidden %s -o - | FileCheck %s +// expected-no-diagnostics AaronBallman wrote: There's no `-verify` line, so this comment doesn't do anythi

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

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

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -4250,6 +4250,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, // The TypeSourceInfo that this function returns will not be a null type. // If there is an error, this function will fill in a dummy type as fallback. QualType T = declSpec

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -428,6 +428,46 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// BrOp +//===--===// + +def BrOp : CIR_Op<"br",

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

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

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-03-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux-shared-plugin` running on `polly-x86_64-gce2` while building `llvm` at step 5 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/118/builds/5204 Here is the relevant piece of

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-03-11 Thread Wael Yehia via cfe-commits
w2yehia wrote: > So I believe this should be generalized to all of Windows (and/or generalized > to check for a COFF object file format?) instead of singling out specifically > MSVC only. Thanks for checking. I can fix the condition but can you please let me know which of the two options you

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Morris Hafner via cfe-commits
@@ -36,6 +36,18 @@ class ScalarExprEmitter : public StmtVisitor { bool ira = false) : cgf(cgf), builder(builder), ignoreResultAssign(ira) {} + //======// + //

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-11 Thread David Rivera via cfe-commits
@@ -194,15 +199,21 @@ void UseDefaultMemberInitCheck::storeOptions( } void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) { - auto InitBase = - anyOf(stringLiteral(), characterLiteral(), integerLiteral(), -unaryOperator(hasAnyOperatorName("+

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-11 Thread Matthew Levy via cfe-commits
https://github.com/matthewlevy97 edited https://github.com/llvm/llvm-project/pull/130103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC]refactor matcher for bugprone-optional-value-conversion (PR #130415)

2025-03-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,5 @@ +// REQUIRES: systemz-registered-target AaronBallman wrote: This question is still open, but also, these look like they should be tested in Sema and not CodeGen. Further, it's missing the `-verify` line so these expected diagnostics aren't actua

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,40 @@ +// REQUIRES: systemz-registered-target +// RUN: %clang_cc1 %s -emit-llvm -fzos-extensions -triple s390x-none-zos -fvisibility=hidden -verify -o - | FileCheck %s + +// Testing missing declarations. +#pragma export(d0) // expected-warning{{failed to resolve '#prag

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -7502,6 +7502,27 @@ attribute requires a string literal argument to identify the handle being releas }]; } +def zOSExportDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +Use the _Export keyword with a function name or external variable to dec

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -1956,6 +1964,10 @@ class Declarator { LLVM_PREFERRED_TYPE(bool) unsigned InlineStorageUsed : 1; + /// Indicates whether this is set as _Export AaronBallman wrote: ```suggestion /// Indicates whether this is set as _Export. ``` https://github.com/l

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -1401,6 +1417,164 @@ bool Parser::HandlePragmaMSAllocText(StringRef PragmaName, return true; } +NestedNameSpecifier *Parser::zOSParseIdentifier(StringRef PragmaName, +IdentifierInfo *IdentName) { AaronBallm

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-03-11 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/127835 >From 02218dfb3cdc1282b474b5f0fde3c6cc8791e0a0 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 14 Feb 2025 17:30:54 -0800 Subject: [PATCH 1/7] [CIR] Initial implementation of lowering CIR to MLIR Add s

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

2025-03-11 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][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. Well, I have to admit that I'm not familiar with this checker -- my recent change is just part of a semi-automated commit series that mechanically changed the same trivial thing in many checkers. However, your change appears to be straig

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-11 Thread Donát Nagy via cfe-commits
@@ -635,6 +668,66 @@ void deque_emplace_back(std::deque &D, int n) { clang_analyzer_eval(clang_analyzer_iterator_validity(i2)); //expected-warning{{FALSE}} } +/// append_range() +/// +/// - Design decision: extends containers to the ->RIGHT-> (i.e. the Nagy

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-03-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/129719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add test for crash repro and clean up const accessor handling (PR #129930)

2025-03-11 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/129930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-11 Thread via cfe-commits
@@ -5189,6 +5197,12 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { return false; } + if (auto *DD = + dyn_cast_if_present(IS->getConditionVariable()); + DD && DD->isDecisionVariable()) cor3ntin wrote: When is `DD->isDecisi

<    2   3   4   5   6   7