[clang] [llvm] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

2025-02-04 Thread via cfe-commits
=?utf-8?q?Csanád_Hajdú?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities Author: Csanád Hajdú (Il-Capitano) Changes Add support for the new SHF_AARCH64_PURECODE ELF section flag: https://github.com/ARM-software/abi-aa/pull/304 The general implementat

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

2025-02-04 Thread Oleksandr T. via cfe-commits
@@ -1596,12 +1596,14 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, QualType ProblemTy; if (T->isAnyPointerType() || T->isReferenceType() || -T->isMemberPointerType()) { +T->isMemberPointerType() || T->isArrayType()) { Qual

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

2025-02-04 Thread Aaron Ballman via cfe-commits
@@ -1190,6 +1190,11 @@ void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, void Sema::AddPragmaAttributes(Scope *S, Decl *D) { if (PragmaAttributeStack.empty()) return; + + if (ParmVarDecl *P = dyn_cast(D)) AaronBallman wrote: ```suggestion

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

2025-02-04 Thread Aaron Ballman via cfe-commits
@@ -1190,6 +1190,11 @@ void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, void Sema::AddPragmaAttributes(Scope *S, Decl *D) { if (PragmaAttributeStack.empty()) return; + + if (ParmVarDecl *P = dyn_cast(D)) +if (P->getIdentifier() == nullptr && P->getType()

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #119750)

2025-02-04 Thread Ivan Kosarev via cfe-commits
https://github.com/kosarev approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/119750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer] Consolidate array bound checkers (PR #125534)

2025-02-04 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I evaluated a sample of 10 random ArrayBoundV2 results from FFMPEG and I found the following: - [Unjustified assumption of third iteration](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=ffmpeg_n4.3.1_edonnag_llvm-main_1883de3&newcheck=ffmpeg_n4.3.

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #119750)

2025-02-04 Thread Ivan Kosarev via cfe-commits
@@ -1690,7 +1715,7 @@ defm V_FMA_F32 : VOP3_Realtriple_gfx11_gfx12<0x213>; defm V_FMA_F64 : VOP3_Real_Base_gfx11_gfx12<0x214>; defm V_LERP_U8 : VOP3_Realtriple_gfx11_gfx12<0x215>; defm V_ALIGNBIT_B32: VOP3_Realtriple_gfx11_gfx12<0x21

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

2025-02-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the fix! https://github.com/llvm/llvm-project/pull/124920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2025-02-04 Thread Aaron Ballman via cfe-commits
@@ -10329,6 +10329,13 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, } } +if (FTIHasSingleVoidParameter(FTI)) { + ParmVarDecl *Param = cast(FTI.Params[0].Param); AaronBallman wrote: ```suggestion const aut

[clang] [Clang] Do not try to transform invalid bindings (PR #125658)

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

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -179,8 +181,40 @@ bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned MaxSteps, return WList->hasWork(); } -void CoreEngine::dispatchWorkItem(ExplodedNode* Pred, ProgramPoint Loc, - const WorkListUnit& WU) { +static std::s

[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

2025-02-04 Thread Kevin P. Neal via cfe-commits
kpneal wrote: > To handle the case where a block isn't owned by a function, we need the > attribute at the call site. I don't know the specifics of how that case > arises, but if we remove the attribute from the call site, we would have to > do something to add it again when the block gets det

[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

2025-02-04 Thread Kevin P. Neal via cfe-commits
@@ -66,6 +66,12 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) { } } +bool IntrinsicInst::canAccessFPEnvironment(LLVMContext &C, Intrinsic::ID IID) { + AttributeList Attrs = Intrinsic::getAttributes(C, IID); + MemoryEffects ME = Attrs.getMemoryEffects();

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

2025-02-04 Thread Erich Keane via cfe-commits
@@ -1190,6 +1190,11 @@ void Sema::ActOnPragmaAttributePop(SourceLocation PragmaLoc, void Sema::AddPragmaAttributes(Scope *S, Decl *D) { if (PragmaAttributeStack.empty()) return; + + if (ParmVarDecl *P = dyn_cast(D)) +if (P->getIdentifier() == nullptr && P->getType()

[clang-tools-extra] [SystemZ][z/OS] Open text files in text mode (PR #125570)

2025-02-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang-tools-extra` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/14056

[clang] [llvm] [analyzer] Consolidate array bound checkers (PR #125534)

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

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

2025-02-04 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 01/10] [Clang] disallow attributes on void parameters --- clan

[clang] [clang] handle fp options in __builtin_convertvector (PR #125522)

2025-02-04 Thread Jakub Ficek via cfe-commits
@@ -5439,3 +5441,21 @@ OpenACCAsteriskSizeExpr * OpenACCAsteriskSizeExpr::CreateEmpty(const ASTContext &C) { return new (C) OpenACCAsteriskSizeExpr({}, C.IntTy); } + +ConvertVectorExpr *ConvertVectorExpr::CreateEmpty(const ASTContext &C, +

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

2025-02-04 Thread Erich Keane via cfe-commits
@@ -3832,6 +3832,9 @@ def warn_type_attribute_wrong_type : Warning< "'%0' only applies to %select{function|pointer|" "Objective-C object or block pointer}1 types; type here is %2">, InGroup; +def warn_attribute_on_void_param: Warning< + "attribute %0 cannot be applied to

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase { /// '\#pragma clang attribute push' directives to the given declaration. void AddPragmaAttributes(Scope *S, Decl *D); - void PrintPragmaAttributeInstantiationPoint(); + using DiagFuncRef = + llvm::function_

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase { /// '\#pragma clang attribute push' directives to the given declaration. void AddPragmaAttributes(Scope *S, Decl *D); - void PrintPragmaAttributeInstantiationPoint(); + using DiagFuncRef = + llvm::function_

[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)

2025-02-04 Thread Kinuko Yasuda via cfe-commits
kinu wrote: Would the alternative that is discussed here mean we want to forward some attributes only when they are applicable, something like `clang::forwad_lifetimebound`? Regardless, I think it'd be also good to agree on the use cases we want to support in a concrete code snippet (that sho

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

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

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-04 Thread via cfe-commits
cor3ntin wrote: @ricejasonf Can i merge this for you? https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)

2025-02-04 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > mean we want to forward some attributes only when they are applicable yes, something like that. And it gets a little tricky, because it's not that we want to forward only attributes from one decl to another, it's many decls (forwarding function itself and its parameters)

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-04 Thread Donát Nagy via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Marco Elver via cfe-commits
melver wrote: FWIW, the Linux kernel integration (draft, WIP) currently lives here: https://github.com/google/kernel-sanitizers/tree/cap-analysis It currently enables -Wthread-safety-addressof if available. Thus far, I have not found any false positives due to -Wthread-safety-addressof in the 2

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -365,13 +388,22 @@ namespace { void runChecker(CheckerManager::CheckBindFunc checkFn, NodeBuilder &Bldr, ExplodedNode *Pred) { + llvm::TimeTraceScope TimeScope(checkerScopeName("Bind", checkFn.Checker)); const ProgramPoint &L = PP.withTa

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -35,6 +36,54 @@ using namespace llvm; namespace cir { namespace direct { +class CIRAttrToValue : public CirAttrVisitor { +public: + mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp, + mlir::Attribute attr, +

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -35,6 +36,54 @@ using namespace llvm; namespace cir { namespace direct { +class CIRAttrToValue : public CirAttrVisitor { +public: + mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp, + mlir::Attribute attr, +

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -84,6 +138,19 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { +auto setupRegionInitializedLLVMGlobalOp = [&]() { erichkeane wrote: I think I'd prefer this get extracted to a functi

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -0,0 +1,51 @@ +#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H +#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H + +#include "clang/CIR/Dialect/IR/CIRAttrs.h" + +namespace cir { + +template class CirAttrVisitor { +public: + // FIXME: Create a TableGen list to automatical

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-02-04 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/124793 >From 16596add29b63ee0282e026dec7b1d5946863113 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Wed, 29 Jan 2025 00:38:15 +0800 Subject: [PATCH 1/4] Fix wrong initialization kind --- clang/lib/Sema/SemaInit.cpp

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-02-04 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/124793 >From 16596add29b63ee0282e026dec7b1d5946863113 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Wed, 29 Jan 2025 00:38:15 +0800 Subject: [PATCH 1/4] Fix wrong initialization kind --- clang/lib/Sema/SemaInit.cpp

[clang] [libclang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125631)

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

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

2025-02-04 Thread Hans Wennborg via cfe-commits
zmodem wrote: The build is still broken (e.g. https://lab.llvm.org/buildbot/#/builders/63/builds/3861). I'll back it out. https://github.com/llvm/llvm-project/pull/115099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-04 Thread via cfe-commits
StarOne01 wrote: I did find what was wrong When we try to correct typos, we seem to do it by looking over all the identifiers in the Context which includes the **typo itself!** ```cpp // clang/lib/Sema/SemaLookup.cpp for (const auto &I : Context.Idents) Consumer->FoundName(I.getKey()); ```

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread via cfe-commits
https://github.com/student433 created https://github.com/llvm/llvm-project/pull/125663 Fixes #114979, adding support for the cl2000 compiler to the clang frontend to get clangd working as discussed in https://discourse.llvm.org/t/ti-c2000-target-not-supported-in-clangd-lsp/83015 >From 5906c0f

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Michael Flanders (Flandini) Changes Fixes https://github.com/llvm/llvm-project/issues/123459. Previously, when the StackAddrEscapeChecker checked return values, it did not scan into the structure of the return SVal. Now

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

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

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/125638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Oliver Stöneberg via cfe-commits
firewave wrote: > It should be relatively easy to add, but I don't want to extend the scope of > this PR. Thanks for the explanation. Yes, please don't extend the scope of the change. https://github.com/llvm/llvm-project/pull/125508 ___ cfe-commits m

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-04 Thread Sinkevich Artem via cfe-commits
https://github.com/ArtSin updated https://github.com/llvm/llvm-project/pull/123963 >From 462b70cfc9f9ad3cafc0dbf595ce758181ecb2a5 Mon Sep 17 00:00:00 2001 From: Artem Sinkevich Date: Tue, 4 Feb 2025 16:27:51 +0400 Subject: [PATCH] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID Add

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-04 Thread Sinkevich Artem via cfe-commits
@@ -0,0 +1,37 @@ +// REQUIRES: linux +// RUN: split-file %s %t.dir +// RUN: %clang_profgen -Wl,--build-id=sha1 -o %t.dir/foo %t.dir/foo.c +// RUN: %clang_profgen -Wl,--build-id=sha1 -o %t.dir/bar %t.dir/bar.c + +// Check that foo and bar have the same signatures. +// RUN: rm -rf %

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-04 Thread Sinkevich Artem via cfe-commits
@@ -855,6 +856,15 @@ static int parseFilenamePattern(const char *FilenamePat, FilenamePat); return -1; } + } else if (FilenamePat[I] == 'b') { +if (!NumBinaryIds++) { + if (__llvm_write_binary_ids(NULL) <= 0) { ---

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #125706)

2025-02-04 Thread Brox Chen via cfe-commits
https://github.com/broxigarchen created https://github.com/llvm/llvm-project/pull/125706 Support true16 format for v_alignbyte_b32 in MC and CodeGen >From 1e63e17cfe20f809045e7209a870b24bd15b5a91 Mon Sep 17 00:00:00 2001 From: guochen2 Date: Thu, 12 Dec 2024 13:33:14 -0500 Subject: [PATCH 1/5]

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #125706)

2025-02-04 Thread Brox Chen via cfe-commits
broxigarchen wrote: Hi @Sisyph @kosarev @arsenm The previous PR of this patch https://github.com/llvm/llvm-project/pull/119750 is stucked and the new commit is not able be displayed. Closed and reopen it here. https://github.com/llvm/llvm-project/pull/125706 __

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #125706)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Brox Chen (broxigarchen) Changes Support true16 format for v_alignbyte_b32 in MC and CodeGen --- Patch is 50.54 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/125706.diff 14 Files Affected: - (

[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)

2025-02-04 Thread via cfe-commits
higher-performance wrote: w.r.t. ABI, I think the end state here would conceptually be most likely be similar to `__attribute__((diagnose_if(...)))`. Does that affect ABI? w.r.t. False positives due to annotating the entire pack -- that's a great point. I think it's avoided by the `noexcept` a

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

2025-02-04 Thread Omar Ahmed via cfe-commits
@@ -498,12 +498,16 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { }; // Forward all of the `--offload-opt` and similar options to the device. - CmdArgs.push_back("-flto"); for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm)) CmdArgs

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > well Thanks, I won't be able to for the next few hours. If it's not trivial to fix, please go ahead and revert. https://github.com/llvm/llvm-project/pull/125372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

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

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -498,12 +498,16 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { }; // Forward all of the `--offload-opt` and similar options to the device. - CmdArgs.push_back("-flto"); for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm)) CmdArgs

[clang] Fix broken clang codegen test (avx-cxx-record.cpp) (PR #125787)

2025-02-04 Thread Pranav Kant via cfe-commits
https://github.com/pranavk created https://github.com/llvm/llvm-project/pull/125787 Fixes e8a486ea97895a18e1bba75431d37d9758886084 >From eaa2581b6b81aa616296f09b859024b3d22fe3c8 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Tue, 4 Feb 2025 23:35:44 + Subject: [PATCH] Fix broken clang co

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -359,18 +359,21 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } - Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { + Error replaceExtractElementTypeOfCallUsages(CallInst *Intrin, CallInst *Op) { for (Use &U : make_early_inc_ra

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
@@ -359,18 +359,21 @@ class OpLowerer { return lowerToBindAndAnnotateHandle(F); } - Error replaceSplitDoubleCallUsages(CallInst *Intrin, CallInst *Op) { + Error replaceExtractElementTypeOfCallUsages(CallInst *Intrin, CallInst *Op) { for (Use &U : make_early_inc_ra

[clang] [llvm] [X86] Extend kCFI with a 3-bit arity indicator (PR #121070)

2025-02-04 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > @lvwr @maurer @rcvalle A gentle reminder to please review this PR. @scottconstable You don't need explicit approvals from all reviewers. Let's wait for 24 hours and land it if no objections. https://github.com/llvm/llvm-project/pull/121070 __

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/125619 >From dc7f71d511d2e13e527e0c8cd242a3ece82bcdfd Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 3 Feb 2025 13:20:51 -0800 Subject: [PATCH 1/2] [CIR] Lowering to LLVM for global pointers Add support for

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

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -1593,34 +1593,31 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, // object or incomplete types shall not be restrict-qualified." if (Qs.hasRestrict()) { unsigned DiagID = 0; -QualType ProblemTy; - -if (T->isAnyPointerType() || T->isRefe

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

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -std=c2y -fsyntax-only -verify -pedantic %s + +typedef int (*T1)[2]; +restrict T1 t1; +static_assert(_Generic(typeof (t1), int (*restrict)[2] : 1, default : 0)); + +typedef int *T2[2]; +restrict T2 t2; +static_assert(_Generic(typeof (t2), int *

[clang] [Clang] Permit both `gnu` and `clang` prefixes on attributes (PR #125796)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/125796 >From 77ee45f25f03614dbb63369922e9722a79ec8518 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 4 Feb 2025 20:03:33 -0600 Subject: [PATCH] [Clang] Permit both `gnu` and `clang` prefixes on attributes Summ

[clang] Reapply "[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly" (PR #125744)

2025-02-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/125744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I like the idea. There are a lot of people suffering not able to send issue reports for modules. https://github.com/llvm/llvm-project/pull/124997 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Clang] Permit both `gnu` and `clang` prefixes on attributes (PR #125796)

2025-02-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/125796 Summary: Some attributes have gnu extensions that share names with clang attributes. If these imply the same thing, we can specially declare this to be an alternate but equivalent spelling. Discussions welcome o

[clang] [Clang] Permit both `gnu` and `clang` prefixes on attributes (PR #125796)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Some attributes have gnu extensions that share names with clang attributes. If these imply the same thing, we can specially declare this to be an alternate but equivalent spelling. Discussions welcom

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/124786 >From 7060564de1bb6062639f4b4839fa17958f212755 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 27 Jan 2025 16:44:30 -0800 Subject: [PATCH 1/5] Initial implementation of clang modules current working dire

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
@@ -397,9 +397,91 @@ void ModuleDepCollector::applyDiscoveredDependencies(CompilerInvocation &CI) { } } +static bool isSafeToIgnoreCWD(const CowCompilerInvocation &CI) { + // Check if the command line input uses relative paths. + // It is not safe to ignore the current wo

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
@@ -63,7 +63,10 @@ enum class ScanningOptimizations { /// Canonicalize -D and -U options. Macros = 8, - DSS_LAST_BITMASK_ENUM(Macros), + /// Ignore the compiler's working directory if it is safe. + IgnoreCWD = 0x10, qiongsiwu wrote: Fixed! Thanks! ht

[clang] 4055be5 - Fix broken clang codegen test (avx-cxx-record.cpp) (#125787)

2025-02-04 Thread via cfe-commits
Author: Pranav Kant Date: 2025-02-04T16:12:12-08:00 New Revision: 4055be55b8814b31256ca3c8840bc73bbe5e3d0f URL: https://github.com/llvm/llvm-project/commit/4055be55b8814b31256ca3c8840bc73bbe5e3d0f DIFF: https://github.com/llvm/llvm-project/commit/4055be55b8814b31256ca3c8840bc73bbe5e3d0f.diff L

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-02-04 Thread Pranav Kant via cfe-commits
pranavk wrote: I fixed this in #125787 https://github.com/llvm/llvm-project/pull/120670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix broken clang codegen test (avx-cxx-record.cpp) (PR #125787)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Pranav Kant (pranavk) Changes Fixes e8a486ea97895a18e1bba75431d37d9758886084 --- Full diff: https://github.com/llvm/llvm-project/pull/125787.diff 1 Files Affected: - (modified) clang/test/CodeGen/X86/avx-cxx-record.cpp (+2-2) `

[clang] Fix broken clang codegen test (avx-cxx-record.cpp) (PR #125787)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pranav Kant (pranavk) Changes Fixes e8a486ea97895a18e1bba75431d37d9758886084 --- Full diff: https://github.com/llvm/llvm-project/pull/125787.diff 1 Files Affected: - (modified) clang/test/CodeGen/X86/avx-cxx-record.cpp (+2-2) ```

[clang] Fix broken clang codegen test (avx-cxx-record.cpp) (PR #125787)

2025-02-04 Thread Pranav Kant via cfe-commits
https://github.com/pranavk closed https://github.com/llvm/llvm-project/pull/125787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] OpenMP 6.0 updates to restrictions with order/concurrent (PR #125621)

2025-02-04 Thread David Pagan via cfe-commits
https://github.com/ddpagan updated https://github.com/llvm/llvm-project/pull/125621 >From deffda7ca37661781f1bae565ac8ae4a8fbba674 Mon Sep 17 00:00:00 2001 From: Dave Pagan Date: Fri, 31 Jan 2025 16:12:08 -0600 Subject: [PATCH 1/3] [clang][OpenMP] OpenMP 6.0 updates to restrictions with order/

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-04 Thread Matheus Izvekov via cfe-commits
@@ -280,7 +280,8 @@ std::optional CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) { new_class_template->getDeclContext(), new_class_template->getTemplatedDecl()->getLocation(), new_class_template->getLocation(), new_class_template, imported_args, -

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] 7a52b93 - [DependencyScanning] Add ability to scan TU with a buffer input (#125111)

2025-02-04 Thread via cfe-commits
Author: Steven Wu Date: 2025-02-04T16:37:29-08:00 New Revision: 7a52b93837123488cd86151f82655979e1397453 URL: https://github.com/llvm/llvm-project/commit/7a52b93837123488cd86151f82655979e1397453 DIFF: https://github.com/llvm/llvm-project/commit/7a52b93837123488cd86151f82655979e1397453.diff LOG

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-02-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/125111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -loader-replaceable-function=override_me -emit-llvm -std=c11 -o - %s | FileCheck %s + +// CHECK: define dso_local void @override_me() #0 +void override_me() {} + +// CHECK: define dso_local void @dont_override_me() #1 +void dont_override_me()

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -4661,3 +4661,110 @@ AsmPrinter::getCodeViewJumpTableInfo(int JTI, const MachineInstr *BranchInstr, return std::make_tuple(Base, 0, BranchLabel, codeview::JumpTableEntrySize::Int32); } + +void AsmPrinter::emitCOFFReplaceableFunctionData(Module &M)

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -4661,3 +4661,110 @@ AsmPrinter::getCodeViewJumpTableInfo(int JTI, const MachineInstr *BranchInstr, return std::make_tuple(Base, 0, BranchLabel, codeview::JumpTableEntrySize::Int32); } + +void AsmPrinter::emitCOFFReplaceableFunctionData(Module &M)

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-04 Thread Eli Friedman via cfe-commits
@@ -561,6 +564,16 @@ class CodeGenOptions : public CodeGenOptionsBase { /// Reset all of the options that are not considered when building a /// module. void resetNonModularOptions(StringRef ModuleFormat); + + // Is the given function name one of the functions that can b

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Matheus Izvekov (mizvekov) Changes Class templates might be only instantiated when they are required to be complete, but checking the template args against the primary template is immediate. This result is cached so that later wh

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

2025-02-04 Thread via cfe-commits
Author: Eugene Epshteyn Date: 2025-02-04T20:50:01-05:00 New Revision: 642288247d0eb59069797f15cdd0f51b41d558c6 URL: https://github.com/llvm/llvm-project/commit/642288247d0eb59069797f15cdd0f51b41d558c6 DIFF: https://github.com/llvm/llvm-project/commit/642288247d0eb59069797f15cdd0f51b41d558c6.dif

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

2025-02-04 Thread Eugene Epshteyn via cfe-commits
https://github.com/eugeneepshteyn closed 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-02-04 Thread via cfe-commits
github-actions[bot] wrote: @eugeneepshteyn Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)

2025-02-04 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/125319 >From 1e194fdf6dc731276cd867501708b348e3bbc97c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Mon, 27 Jan 2025 11:18:09 -0800 Subject: [PATCH 1/5] Implement AddUint64 HLSL codegen and sema --- clang/include/

[clang] Reapply "[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (#99687)" (PR #125744)

2025-02-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/125744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Emit warnings on incorrect AVR interrupt/signal handlers (PR #125328)

2025-02-04 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/125328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-02-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Can any of the members in the structs be reorganized to put the mutex member declaration BEFORE the members they guard? Probably not always, but perhaps that's possible for most structures? https://github.com/llvm/llvm-project/pull/123063

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2025-02-04 Thread Reid Kleckner via cfe-commits
rnk wrote: > But one specific question: would you prefer me to land as a series of commits > or a single squashed commit for the entire PR? I'm happy either way. My mild > preference is to prefer the series of commits, but open to suggestions here. I would land it as the six-patch stack in thi

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Right now if someone passes -Xarch_foo --offload-arch=gfx1030 and foo > > doesn't match it's not passed and it will print something like this. I > > figured that's good enough. > > This part SGTM, too. > > However, I don't think I've seen the answer what happens when we do

[clang] [llvm] [clangd] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread James Nagurne via cfe-commits
DragonDisciple wrote: General comments: - Please do not use tabs for spacing. This is what causes the unexpected whitespace gaps in the diff. - There is a utility, clang-format-diff.py, which will assist in appeasing the code formatting check. However, I noticed running it myself that it chang

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

2025-02-04 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >