[clang] [Clang][Sema] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/125097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-31 Thread Timm Baeder via cfe-commits
tbaederr wrote: Changes seem fine once the code formatting is fixed. https://github.com/llvm/llvm-project/pull/125097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2025-01-31 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Did this already land in 19.1.7? No, it will appear in clangd 20. https://github.com/llvm/llvm-project/pull/67749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/124762 >From 4d883f068c5061e60e90e51d149a361920b431d2 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Thu, 12 Dec 2024 15:29:31 + Subject: [PATCH 1/7] [ARM] Empty structs are 1-byte for C++ ABI For C++ (but

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread Oliver Stannard via cfe-commits
ostannard wrote: The release notes have now been cleared on main, so I'll re-add them in the llvm-20 cherry pick. https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] 97b066f - [ARM] Empty structs are 1-byte for C++ ABI (#124762)

2025-01-31 Thread via cfe-commits
Author: Oliver Stannard Date: 2025-01-31T09:03:01Z New Revision: 97b066f4e92a0df46b9d10721e988210f0d1afb6 URL: https://github.com/llvm/llvm-project/commit/97b066f4e92a0df46b9d10721e988210f0d1afb6 DIFF: https://github.com/llvm/llvm-project/commit/97b066f4e92a0df46b9d10721e988210f0d1afb6.diff LO

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-31 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. lgtm Unless there are any further comments, I'll push the Merge button on Monday. https://github.com/llvm/llvm-project/pull/117622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clangd] Add code completion for if constexpr (PR #124315)

2025-01-31 Thread via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From 0715933267a45b43d3c36bd63d59a00497ff5231 Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH] [Sema] Add code completion for if constexpr C++17 supports `if co

[clang] [Sema] Add code completion for if constexpr (PR #124315)

2025-01-31 Thread via cfe-commits
https://github.com/FantasqueX edited https://github.com/llvm/llvm-project/pull/124315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-31 Thread Ivana Ivanovska via cfe-commits
@@ -68,32 +70,60 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, if (StParents.size() > 1) return "unavailable due to multiple parents"; -if (StParents.size() == 0) +if (StParents.empty()) break; St = StParents.begin()->get();

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-31 Thread Ivana Ivanovska via cfe-commits
@@ -68,32 +70,60 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, if (StParents.size() > 1) return "unavailable due to multiple parents"; -if (StParents.size() == 0) +if (StParents.empty()) break; St = StParents.begin()->get();

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/125199 These are available for all translations implicitly. We shouldn't report explicit refs and enforce includes. From 4d6967a12f6793a27ed39fd7a7c1cc32fa001a09 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date:

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
kadircet wrote: so this is the alternative to https://github.com/llvm/llvm-project/pull/123027. as discussed offline that change would break translation units that depend on a user-provided declaration for new/delete operators. https://github.com/llvm/llvm-project/pull/125199 _

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: kadir çetinkaya (kadircet) Changes These are available for all translations implicitly. We shouldn't report explicit refs and enforce includes. --- Full diff: https://github.com/llvm/llvm-project/pull/125199.diff 2 Files Aff

[clang-tools-extra] [include-cleaner] Add special mappings for operator new/delete (PR #123027)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/123027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2025-01-31 Thread Chiller Dragon via cfe-commits
ChillerDragon wrote: Did this already land in 19.1.7? I am having trouble getting it to work. My ``~/.clangd`` looks like this just to be sure I also put it in ``~/Desktop/git/ddnet/.clangd`` the repo root. ```yaml CompileFlags: Add: -I. Diagnostics: MissingIncludes: Strict Style: Angled

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread Oliver Stannard via cfe-commits
ostannard wrote: /cherry-pick 97b066f4e92a0df46b9d10721e988210f0d1afb6 https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Add special mappings for operator new/delete (PR #123027)

2025-01-31 Thread kadir çetinkaya via cfe-commits
kadircet wrote: abandoning in favor of https://github.com/llvm/llvm-project/pull/125199 https://github.com/llvm/llvm-project/pull/123027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-31 Thread Ivana Ivanovska via cfe-commits
https://github.com/ivanaivanovska edited https://github.com/llvm/llvm-project/pull/124554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (PR #125200)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125200 Both getLocation() and getRange() use the RetPC if the current function doesn't have a usable body. Using PC here was just a typo. >From 07af7276f1bebc995d26d0c2c24d22e7554a734d Mon Sep 17 00:00:00 2001 From:

[clang] [clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (PR #125200)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Both getLocation() and getRange() use the RetPC if the current function doesn't have a usable body. Using PC here was just a typo. --- Full diff: https://github.com/llvm/llvm-project/pull/125200.diff 1 Fil

[clang] [clang][bytecode][NFC] Remove unused function (PR #125201)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125201 ... and an unused include. >From 082aa4251b59288275dc08e69ab70024fa9726c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 31 Jan 2025 12:20:22 +0100 Subject: [PATCH] [clang][bytecode][N

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-01-31 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/125077 >From 620bb22d1b44f3c60e15d2847fdcfd3dd9aafa51 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Thu, 30 Jan 2025 15:08:24 + Subject: [PATCH 1/2] [clang] Support member function poiners in Decl::getFunct

[clang] [clang][bytecode][NFC] Remove unused function (PR #125201)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... and an unused include. --- Full diff: https://github.com/llvm/llvm-project/pull/125201.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/EvalEmitter.h (-3) ``diff diff --git a/clang

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-01-31 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > Maybe the description here should more explicitly state that it looks for > function pointers as well as functions... > > > Good idea :+1: I've attempted to clarify what this function does now (in the doc comment). > Probably we should fix the error message not to mention K&

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-01-31 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/124754 >From 741fcf90830c6a30be851c43924e9ab95c40b8a7 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Tue, 28 Jan 2025 15:15:01 +0530 Subject: [PATCH 1/3] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOp

[clang] [clang:frontend] Move helper functions to common location for SemaSPIRV (PR #125045)

2025-01-31 Thread via cfe-commits
Sirraide wrote: Yup, looking at the logs, there’s definitely an error somewhere in this pr (don’t really have the time to take a closer look at it at the moment unfortunately) https://github.com/llvm/llvm-project/pull/125045 ___ cfe-commits mailing l

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread Oliver Stannard via cfe-commits
ostannard wrote: /cherry-pick 97b066f4e92a0df46b9d10721e988210f0d1afb6 https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard milestoned https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread via cfe-commits
llvmbot wrote: >/cherry-pick 97b066f4e92a0df46b9d10721e988210f0d1afb6 Error: Command failed due to missing milestone. https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#125191 https://github.com/llvm/llvm-project/pull/124762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=X86 %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=X86_64 %s +// RUN: %clang_cc1 -triple riscv32-unknown-unknown -em

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-31 Thread via cfe-commits
@@ -899,6 +899,12 @@ def FrameAddress : Builtin { let Prototype = "void*(_Constant unsigned int)"; } +def StackAddress : Builtin { + let Spellings = ["__builtin_stack_address"]; + let Attributes = [NoThrow]; aalhwc wrote: I may be wrong here but I am not

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-31 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/14992 Here is the releva

[clang] [TableGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125158)

2025-01-31 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/125158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-31 Thread via cfe-commits
@@ -4782,6 +4857,34 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, Function *F = CGM.getIntrinsic(Intrinsic::frameaddress, AllocaInt8PtrTy); return RValue::get(Builder.CreateCall(F, Depth)); } + case Builtin::BI__builtin_stack_ad

[clang] [clang:frontend] Move helper functions to common location for SemaSPIRV (PR #125045)

2025-01-31 Thread via cfe-commits
Sirraide wrote: Well, I’ve encountered a bunch of failing tests lately, but the fact that SPIRV and HLSL tests are failing is a bit suspicious https://github.com/llvm/llvm-project/pull/125045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-31 Thread via cfe-commits
aalhwc wrote: Thanks for all the comments! > Should we be supporting STACK_ADDRESS_OFFSET similar to what GCC does? Apologies for missing that. I'll have it ready before the next patch update. > Other builtins [...] map onto an llvm intrinsic [...] What's the reason for > not following this d

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-01-31 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/125077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-31 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/122116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 77d3f8a - [TBAA] Don't emit pointer-tbaa for void pointers. (#122116)

2025-01-31 Thread via cfe-commits
Author: Florian Hahn Date: 2025-01-31T11:38:14Z New Revision: 77d3f8a92564b533a3c60a8c8e0657c38fd88ba1 URL: https://github.com/llvm/llvm-project/commit/77d3f8a92564b533a3c60a8c8e0657c38fd88ba1 DIFF: https://github.com/llvm/llvm-project/commit/77d3f8a92564b533a3c60a8c8e0657c38fd88ba1.diff LOG:

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-31 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/122116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-31 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/125097 >From 021481832a31f7d6c01f6faec5140498641eb37b Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 30 Jan 2025 17:29:48 + Subject: [PATCH 1/2] [Clang][NFC] Add special handling of mfloat8 in initializer

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -899,6 +899,12 @@ def FrameAddress : Builtin { let Prototype = "void*(_Constant unsigned int)"; } +def StackAddress : Builtin { + let Spellings = ["__builtin_stack_address"]; + let Attributes = [NoThrow]; AaronBallman wrote: I wasn't 100% sure; I thoug

[clang] [CIR] Fix some clang-tidy problems in CIR (PR #125128)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/125128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add tcgen05 alloc/dealloc intrinsics (PR #124961)

2025-01-31 Thread Durgadoss R via cfe-commits
https://github.com/durga4github updated https://github.com/llvm/llvm-project/pull/124961 >From 467c3a41badb66b9187864a040c9eeccef1b583c Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Wed, 29 Jan 2025 16:31:06 +0530 Subject: [PATCH] [NVPTX] Add tcgen05 alloc/dealloc intrinsics This patch adds

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-31 Thread Donát Nagy via cfe-commits
@@ -124,24 +124,26 @@ void ExprEngine::VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S, bool isContainerNull = state->isNull(collectionV).isConstrainedTrue(); - ExplodedNodeSet dstLocation; - evalLocation(dstLocation, S, elem, Pred, state, elementV, false); +

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH] [Clang] allow restrict qualifier for array types with pointer

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -50,8 +50,8 @@ struct testRecoverStrictnessStruct { }; #pragma clang attribute pop -#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), variable, enum)) -// expected-error@-1 {{attribute 'abi_tag' cannot be appli

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-31 Thread Phoebe Wang via cfe-commits
@@ -146,8 +146,13 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in // current formulation is based on what was easiest to recognize from the // pre-TableGen version. -let Features = "mmx", Attributes = [NoThrow, Const] in { - def _mm_prefet

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -10326,6 +10326,15 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +if (FTIHasSingleVoidParameter(FTI)) { + ParmVarDecl *Param = cast(FTI.Params[0].Param); + if (Param->hasAttrs()) { +for (const auto *A : Param

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -107,6 +107,8 @@ Removed Compiler Flags Attribute Changes in Clang -- +- Clang now disallows the use of attributes on void parameters. (#GH108819) AaronBallman wrote: ```suggestion - Clang now diagnoses use of declaration attributes

[clang] [clang][bytecode][NFC] Remove unused function (PR #125201)

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

[clang] [clang][bytecode][NFC] Remove unused function (PR #125201)

2025-01-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9695 Here is the relevant

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 1/8] [Clang] disallow attributes on void parameters --- clang/

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 1/7] [Clang] disallow attributes on void parameters --- clang/

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-31 Thread Ilya Biryukov via cfe-commits
@@ -1986,112 +2362,117 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { } }; -/// Scan the function and return a list of gadgets found with provided kits. -static void findGadgets(const Stmt *S, ASTContext &Ctx, -const UnsafeBufferU

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-31 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/124554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #124554)

2025-01-31 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: This generally looks good, just one more minor comment from me. Could we put this out of the draft state and send to upstream owners of the check to start a discussion about landing it? https://github.com/llvm/llvm-project/pull/124554

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 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 b3458fdec5e183b49c634b72b828630bb6972400 afe40bf1b7095c3758f98327205ea39a1740f48d --e

[clang] [CIR] Fix some clang-tidy problems in CIR (PR #125128)

2025-01-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/125128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/125250 Microsoft allows the 'inline' specifier on a typedef of a function type in C modes. This is used by a system header (ufxclient.h), so instead of giving a hard error, we diagnose with a warning. C++ mode and

[clang] [NFC][analyzer][docs] Improve Annotations.rst (PR #122749)

2025-01-31 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/122749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b9207ae - [NFC][analyzer][docs] Improve Annotations.rst (#122749)

2025-01-31 Thread via cfe-commits
Author: Donát Nagy Date: 2025-01-31T18:01:08+01:00 New Revision: b9207aef09387342837069d2c0857e6d331a516c URL: https://github.com/llvm/llvm-project/commit/b9207aef09387342837069d2c0857e6d331a516c DIFF: https://github.com/llvm/llvm-project/commit/b9207aef09387342837069d2c0857e6d331a516c.diff LO

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Peter Klausler via cfe-commits
https://github.com/klausler edited https://github.com/llvm/llvm-project/pull/125248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Peter Klausler via cfe-commits
https://github.com/klausler approved this pull request. Well done! Thank you. https://github.com/llvm/llvm-project/pull/125248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125253 Instead of heap-allocating it. This is similar to what the current interpeter does. In C, we have no function calls, so the extra heap allocation never makes sense. >From 26c07a4b0b5c85de8fa3ab394ece750dac905

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-platform-windows Author: Aaron Ballman (AaronBallman) Changes Microsoft allows the 'inline' specifier on a typedef of a function type in C modes. This is used by a system header (ufxclient.h), so instead of giving a hard error, we diagnose with a warning

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Eugene Epshteyn via cfe-commits
https://github.com/eugeneepshteyn updated https://github.com/llvm/llvm-project/pull/125248 >From 11cb96c5dcb911a24596c646fbbc3cc6f3fd10a4 Mon Sep 17 00:00:00 2001 From: Eugene Epshteyn Date: Fri, 31 Jan 2025 10:52:00 -0500 Subject: [PATCH 1/5] [flang] Add support for -fimplicit-none-ext option

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125253 >From 797ce103eb62d6b41882d8659bc2e7a700d846d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 31 Jan 2025 09:34:32 +0100 Subject: [PATCH] [clang][bytecode] Stack-allocate bottom functio

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Instead of heap-allocating it. This is similar to what the current interpeter does. In C, we have no function calls, so the extra heap allocation never makes sense. --- Full diff: https://github.com/llvm/ll

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Eugene Epshteyn via cfe-commits
@@ -34,13 +34,13 @@ ENUM_CLASS(LanguageFeature, BackslashEscapes, OldDebugLines, EquivalenceSameNonSequence, AdditionalIntrinsics, AnonymousParents, OldLabelDoEndStatements, LogicalIntegerAssignment, EmptySourceFile, ProgramReturn, ImplicitNoneTypeNever, ImplicitNon

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

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

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes Fixes #125225 --- Full diff: https://github.com/llvm/llvm-project/pull/125232.diff 3 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticParseKinds.td (+2) - (modified) clang/lib/Parse/ParseExp

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/125232 Fixes #125225 >From 5ecb2de4ba92619dc0bee89e06db5203e256ea42 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 31 Jan 2025 14:59:39 +0100 Subject: [PATCH] Diagnose the code with trailing comma in the functio

[clang] [clang] Catch missing format attributes (PR #105479)

2025-01-31 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 2571d6fb3fcb039b22ae79dde08dd79e277f8910 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] Pass -offload-lto instead of -lto for cuda/hip kernels (PR #125243)

2025-01-31 Thread Omar Ahmed via cfe-commits
https://github.com/omarahmed updated https://github.com/llvm/llvm-project/pull/125243 >From fcfe4fafa937b6320e779f56c2ba42327df143d4 Mon Sep 17 00:00:00 2001 From: omarahmed Date: Fri, 31 Jan 2025 15:42:11 + Subject: [PATCH] Pass -offload-lto instead of -lto for cuda/hip kernels --

[clang] Pass -offload-lto instead of -lto for cuda/hip kernels (PR #125243)

2025-01-31 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 6dd07b17c7ff8e61073a7732e09fa828a64f7bec b771905671c80912aceeec414a49fe4581c9b796 --e

[clang] [llvm] [Hexagon] Set the default compilation target to V68 (PR #125239)

2025-01-31 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar created https://github.com/llvm/llvm-project/pull/125239 Set the default compilation target to V68 if no Hexagon processor is specified at the command-line. Add the elf header changes for v81/v83/v85 architectures. >From 041813a5de078adaf8d86bbeb2c92f19ce5828eb Mon Se

[clang] Pass -offload-lto instead of -lto for cuda/hip kernels (PR #125243)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Omar Ahmed (omarahmed) Changes ClangLinkerWrapper tool in one of its clang commands to generate ptx kernel binary from llvm bitcode kernel was using -flto option which should be only used for cpu code not gpu kernel code. This

[clang] [llvm] [Hexagon] Set the default compilation target to V68 (PR #125239)

2025-01-31 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar updated https://github.com/llvm/llvm-project/pull/125239 >From 31d9cadd9c14e703af6eafa20a5c6e4a69b9c526 Mon Sep 17 00:00:00 2001 From: Ikhlas Ajbar Date: Thu, 30 Jan 2025 15:35:51 -0800 Subject: [PATCH] [Hexagon] Set the default compilation target to V68 Set the defau

[clang] [llvm] [mlir] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-01-31 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: @nikic Mind glancing over the draft quickly? !llvm.errno.tbaa is being attached to individual load/store accessing errno, although I just realized that this information is already embedded in TBAA, so IIUC !llvm.errno.tbaa should just be a module-level list of int-compa

[clang] [AArch64] Simplify definitions of SVE/SME intrinsics which set FPMR (PR #123796)

2025-01-31 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 759ef58 - [Hexagon] Set the default compilation target to V68 (#125239)

2025-01-31 Thread via cfe-commits
Author: Ikhlas Ajbar Date: 2025-01-31T11:59:39-06:00 New Revision: 759ef5811e2297f2cbe7578f7c118668e3467c6a URL: https://github.com/llvm/llvm-project/commit/759ef5811e2297f2cbe7578f7c118668e3467c6a DIFF: https://github.com/llvm/llvm-project/commit/759ef5811e2297f2cbe7578f7c118668e3467c6a.diff

[clang] [llvm] [Hexagon] Set the default compilation target to V68 (PR #125239)

2025-01-31 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar closed https://github.com/llvm/llvm-project/pull/125239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -1,8 +1,10 @@ // Smoke test for ClangIR-to-LLVM IR code generation // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - | FileCheck %s -// TODO: Add checks when proper lowering is implemented. -// For now, we're just creating an empty mod

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread Matheus Izvekov via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -31,6 +33,24 @@ namespace direct { std::unique_ptr lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule, llvm::LLVMContext &llvmCtx); + +class CIRToLLVMGlobalOpLowering +: public mlir::OpConversionPattern { + mlir::DataLayout const &dataLa

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

  1   2   3   4   5   >