[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

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

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-16 Thread via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s -verify -Wimplicit-int-conversion +// RUN: %clang_cc1 %s -verify -Wimplicit-int-conversion -Wno-implicit-int-conversion-on-negation -DNO_DIAG + +#ifdef NO_DIAG +unsigned char test_no_diag(unsigned char x) { +return -x; // expected-no-d

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-16 Thread via cfe-commits
@@ -12091,6 +12091,11 @@ void Sema::CheckImplicitConversion(Expr *E, QualType T, SourceLocation CC, if (SourceMgr.isInSystemMacro(CC)) return; +if (const auto *UO = dyn_cast(E)) { + return DiagnoseImpCast(*this, E, T, CC, + diag:

[clang-tools-extra] [CLANGD] [NFC] Fix proposed by sanitizer. (PR #140116)

2025-05-16 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM. In the future, please provide more details about exactly which tool you are using, which you call "sanitizer". For example, what is the name of the tool? "sanitizers" are tools to detect issues at runtime; here you are using a

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-16 Thread via cfe-commits
https://github.com/cor3ntin commented: The direction looks good. Can you add more tests, with different integer types? Thanks https://github.com/llvm/llvm-project/pull/139429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

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

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-05-16 Thread via cfe-commits
@@ -3629,17 +3644,17 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, Result = VD->getEvaluatedValue(); - // C++23 [expr.const]p8 - // ... For such an object that is not usable in constant expressions, the - // dynamic type of the object is constexpr-un

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

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

[clang] Sycl builtin kernel name (PR #140230)

2025-05-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/140230 None >From eeea84b4989b4497cc804f403258b986c09cf5ab Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Thu, 8 Aug 2024 18:05:48 -0700 Subject: [PATCH 1/5] [SYCL] Add support for __builtin_sycl_kernel_name

[clang] [clang][NFC] Clean up Expr::isTemporaryObject() (PR #140229)

2025-05-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/140229 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] Sycl builtin kernel name (PR #140230)

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

[clang] Sycl builtin kernel name (PR #140230)

2025-05-16 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 HEAD~1 HEAD --extensions cpp,h -- clang/test/CodeGenSYCL/builtin-sycl-kernel-name.cpp

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-05-16 Thread Kiran Chandramohan via cfe-commits
@@ -421,7 +421,8 @@ static void CheckSubscripts( static void CheckSubscripts( semantics::SemanticsContext &context, CoarrayRef &ref) { - const Symbol &coarraySymbol{ref.GetBase().GetLastSymbol()}; + const auto &base = ref.GetBase(); + const Symbol &coarraySymbol{base.Ge

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-05-16 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan commented: Thanks for this PR. Do you have any compilation time and performance data? https://github.com/llvm/llvm-project/pull/140182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [libcxx] [Cygwin][MinGW] Internal class in explicitly-instantiation-declarated template should be instantiated (PR #140145)

2025-05-16 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya updated https://github.com/llvm/llvm-project/pull/140145 >From 827e89b8148e7eaa69bbae342cfb2a59d1b09133 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Mon, 21 Apr 2025 23:30:13 +0900 Subject: [PATCH 1/2] [Cygwin][MinGW] Internal class in explicitly-instantiation-de

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-16 Thread Carlos Alberto Enciso via cfe-commits
CarlosAlbertoEnciso wrote: > Got measurements on debug info size growth or any other metrics we should be > considering? I will prepare some measurements on debug info size. https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing li

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-05-16 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/140182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)

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

[clang] [libcxx] [Cygwin][MinGW] Internal class in explicitly-instantiation-declarated template should be instantiated (PR #140145)

2025-05-16 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya updated https://github.com/llvm/llvm-project/pull/140145 >From 827e89b8148e7eaa69bbae342cfb2a59d1b09133 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Mon, 21 Apr 2025 23:30:13 +0900 Subject: [PATCH 1/3] [Cygwin][MinGW] Internal class in explicitly-instantiation-de

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-16 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: Moving the checks does work for these limited cases, but now that we don't have them there, one of the old tests now doesn't show up the diagnosis: ```c++ void f() { throw; } void g() { try { f(); } catch (...) { } } ``` Since there is a separate call: ```c++ re

[clang] [clang] Fix assertion failure in constexpr union deserialization (PR #140179)

2025-05-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh updated https://github.com/llvm/llvm-project/pull/140179 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-16 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 HEAD~1 HEAD --extensions c,cpp -- clang/test/Sema/implicit-int-conversion-on-int.c cl

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-16 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/139429 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Adopt non-templated and array-ref returning forms of `getTrailingObjects` in Expr.cpp/.h. Use ArrayRef forms to eliminate manual asserting for OOB index. Use llvm::copy() instead of std::copy() in some insta

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-16 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/140102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: I started a measurement on open source projects to see the effect of this change on the (total) analysis runtime. I don't expect much but if this turns out to be non-negligible, then I will prioritize this direction. https://github.com/llvm/llvm-project/pull/139939 ___

[clang] dd32ad1 - [Clang][Lex][NFC] Assert getExternalSource() in updateOutOfDateIdentifier (#140137)

2025-05-16 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-05-16T06:26:56-07:00 New Revision: dd32ad1c3787c51e72d496c03ab7948c98f93e06 URL: https://github.com/llvm/llvm-project/commit/dd32ad1c3787c51e72d496c03ab7948c98f93e06 DIFF: https://github.com/llvm/llvm-project/commit/dd32ad1c3787c51e72d496c03ab7948c98f93e06.dif

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread Alexey Bataev via cfe-commits
@@ -4898,6 +4898,274 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [OpenCL] No need to check array of struct for kernel arguments (PR #138894)

2025-05-16 Thread Jiefeng Wang via cfe-commits
https://github.com/jiefwo updated https://github.com/llvm/llvm-project/pull/138894 >From 78e6da1b9f49e23afe77878b81a0aafde8108976 Mon Sep 17 00:00:00 2001 From: Jiefeng Wang Date: Wed, 7 May 2025 23:02:03 +0800 Subject: [PATCH] [OpenCL] No need to check array of struct for kernel arguments Si

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread Alexey Bataev via cfe-commits
@@ -4898,6 +4898,274 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -758,6 +758,10 @@ AMDGPU Support ^^ - Bump the default code object version to 6. ROCm 6.3 is required to run any program compiled with COV6. +- Introduced a new target specific builtin ``__builtin_amdgcn_processor_is``, + a late / deferred query for the curren

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -6653,6 +6654,22 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, if (Result.isInvalid()) return ExprError(); Fn = Result.get(); + // The __builtin_amdgcn_is_invocable builtin is special, and will be resolved + // later, when we che

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -758,6 +758,10 @@ AMDGPU Support ^^ - Bump the default code object version to 6. ROCm 6.3 is required to run any program compiled with COV6. +- Introduced a new target specific builtin ``__builtin_amdgcn_processor_is``, + a late / deferred query for the curren

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -366,4 +367,72 @@ void SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(Decl *D, addAMDGPUMaxNumWorkGroupsAttr(D, AL, AL.getArgAsExpr(0), YExpr, ZExpr); } +Expr *SemaAMDGPU::ExpandAMDGPUPredicateBI(CallExpr *CE) { + auto &Ctx = getASTContext(); erichkeane wr

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -64,6 +68,11 @@ class SemaAMDGPU : public SemaBase { void handleAMDGPUNumVGPRAttr(Decl *D, const ParsedAttr &AL); void handleAMDGPUMaxNumWorkGroupsAttr(Decl *D, const ParsedAttr &AL); void handleAMDGPUFlatWorkGroupSizeAttr(Decl *D, const ParsedAttr &AL); + + /// Expan

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -13338,4 +13338,23 @@ def err_acc_device_type_multiple_archs // AMDGCN builtins diagnostics def err_amdgcn_load_lds_size_invalid_value : Error<"invalid size value">; def note_amdgcn_load_lds_size_valid_value : Note<"size must be %select{1, 2, or 4|1, 2, 4, 12 or 16}0">; +de

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: First, please take a look at the LLVM coding standard re the use of 'auto'. Second: The use of a special type for these builtins is a little novel (though I see the predicate type already exists?), but I guess I'm ok with it. I have some concerns with

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -581,6 +581,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) { case BuiltinType::Id: \ return llvm::TargetExtType::get(getLLVMContext(), "amdgcn.named.barrier", \ {}, {S

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-05-16 Thread Sebastian Pop via cfe-commits
sebpop wrote: > Do you have any compilation time and performance data? @madhur13490 did several changes to loop interchange to optimize the overall compilation time with the pass. I believe Madhur has only looked at c/c++ benchmarks and not at how loop interchange would impact flang. I think

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > Moving the checks does work for these limited cases, but now that we don't > have them there, one of the old tests now doesn't show up the diagnosis: > > ```c++ > void f() { > throw; > } > > void g() { > try { > f(); > } catch (...) { > } > } > ``` > > Since th

[clang] [Clang][Lex][NFC] Assert getExternalSource() in updateOutOfDateIdentifier (PR #140137)

2025-05-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/140137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-16 Thread via cfe-commits
@@ -0,0 +1,283 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-16 Thread Richard Smith via cfe-commits
zygoloid wrote: Conversion function templates might be a special case here because of how conversion function template specializations are found by deduction as part of class member name lookup. Maybe we're doing something different in that deduction in particular that means we're not properly

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Shilei Tian via cfe-commits
@@ -683,6 +683,30 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_2d_f32_i32: { +llvm::Type *RetTy = llvm::Type::getFloatTy(Builder.getContext()); +

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-16 Thread Alexandre Ganea via cfe-commits
@@ -0,0 +1,283 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anton Korobeynikov (asl) Changes compared to other integer types when computing function pointer type discriminator. These parameter types have different parameter passing ABI as compared to ordinary integer types (e.g. require 2 registe

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

2025-05-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/139154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Move initialization of ptrauth-* function attrs (PR #140277)

2025-05-16 Thread Anatoly Trosinenko via cfe-commits
https://github.com/atrosinenko created https://github.com/llvm/llvm-project/pull/140277 Move the initialization of ptrauth-* function attributes near the initialization of branch protection attributes. The semantics of these groups of attributes partially overlaps, so initialize them both in

[clang] [clang] Fixed Constant Evaluation don't Call Destructor (PR #140278)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vincent (Mr-Anyone) Changes Within the condition statement of the for block, the destructor doesn't get when evaluating compile time constants. resolves #139818 --- Full diff: https://github.com/llvm/llvm-project/pull/140278.diff 3 Fi

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

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

[clang] ec44c74 - [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (#139154)

2025-05-16 Thread via cfe-commits
Author: Andres-Salamanca Date: 2025-05-16T09:38:56-07:00 New Revision: ec44c74fe7444c521c82e1ebef0d6a4e7be33252 URL: https://github.com/llvm/llvm-project/commit/ec44c74fe7444c521c82e1ebef0d6a4e7be33252 DIFF: https://github.com/llvm/llvm-project/commit/ec44c74fe7444c521c82e1ebef0d6a4e7be33252.di

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-05-16 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl created https://github.com/llvm/llvm-project/pull/140276 compared to other integer types when computing function pointer type discriminator. These parameter types have different parameter passing ABI as compared to ordinary integer types (e.g. require 2 registers instead

[clang] [llvm] [NFCI][Sanitizer] Convert SpecialCaseList::Sections from StringMap to vector. (PR #140127)

2025-05-16 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/140127 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [clang] Fixed Constant Evaluation don't Call Destructor (PR #140278)

2025-05-16 Thread via cfe-commits
https://github.com/Mr-Anyone created https://github.com/llvm/llvm-project/pull/140278 Within the condition statement of the for block, the destructor doesn't get when evaluating compile time constants. resolves #139818 Rate limit · GitHub body {

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-16 Thread Grigory Pastukhov via cfe-commits
grigorypas wrote: @mizvekov Could you please merge if it is good to go? I don't have write access. https://github.com/llvm/llvm-project/pull/139973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [NFCI][cfi] Refactor into 'SanitizerInfoFromCFICheckKind' (PR #140117)

2025-05-16 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: LGTM https://github.com/llvm/llvm-project/pull/140117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2025-05-16 Thread Reid Kleckner via cfe-commits
rnk wrote: Sorry to hear about the issue. I think the way this is supposed to work is that the clang frontend target ABIInfo is supposed to carefully construct struct types that cause the backend to pass the C struct type correctly in registers and memory. See for example clang/lib/CodeGen/Tar

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[clang] [llvm] [DirectX][SPIRV] Fix the lowering of dot4add (PR #140315)

2025-05-16 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. https://github.com/llvm/llvm-project/pull/140315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Paul Kirth via cfe-commits
@@ -70,18 +70,116 @@ class MustacheTemplateFile : public Template { MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {} }; +static std::unique_ptr NamespaceTemplate = nullptr; + +static std::unique_ptr RecordTemplate = nullptr; + +static Error setupTemplat

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: A question in the comments but otherwise PR looks good: adds boilerplate and initial cases, deferring more work for incremental PRs, way to go. https://github.com/llvm/llvm-project/pull/140304 ___ cfe-commit

[clang] [libcxx] [Cygwin][MinGW] Internal class in explicitly-instantiation-declarated template should be instantiated (PR #140145)

2025-05-16 Thread via cfe-commits
jeremyd2019 wrote: They've failed linking things due to missing `std::istream::sentry` - I've started a new run https://github.com/jeremyd2019/llvm-mingw/actions/runs/15078849158 with ``` #if defined(__MINGW32__) || defined(__CYGWIN__) extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS

[clang] [llvm] [DirectX][SPIRV] Fix the lowering of dot4add (PR #140315)

2025-05-16 Thread Finn Plummer via cfe-commits
@@ -1,17 +1,19 @@ -// RUN: %clang_cc1 -finclude-default-header -triple \ -// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \ -// RUN: FileCheck %s -DTARGET=dx -// RUN: %clang_cc1 -finclude-default-header -triple \ -// RUN: spirv-pc-vulkan-com

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Paul Kirth via cfe-commits
@@ -70,18 +70,116 @@ class MustacheTemplateFile : public Template { MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {} }; +static std::unique_ptr NamespaceTemplate = nullptr; + +static std::unique_ptr RecordTemplate = nullptr; + +static Error setupTemplat

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-05-16 Thread Marco Maia via cfe-commits
https://github.com/marcogmaia edited https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-16 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi edited https://github.com/llvm/llvm-project/pull/140247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2025-05-16 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: ``` typedef __attribute__((__ext_vector_type__(2))) float float2; struct vec2 { float2 _v; public: constexpr vec2(float x, float y) { _v.x = x; _v.y = y; } }; constexpr struct vec2 f() { return vec2(1.0, 1.0); } int main() { vec2 S = f(); } `

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/139959 >From be7df595c1df0f310a1941da3d3ac3529270241e Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 29 Apr 2025 16:46:08 -0700 Subject: [PATCH 1/5] WIP - debug `matchSelectToFaceForward` --- .../lib/Headers/hlsl/hl

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[clang] [libcxx] libcxx: std::ostream::sentry should be exported (PR #140169)

2025-05-16 Thread via cfe-commits
https://github.com/jeremyd2019 closed https://github.com/llvm/llvm-project/pull/140169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] libcxx: std::ostream::sentry should be exported (PR #140169)

2025-05-16 Thread via cfe-commits
https://github.com/jeremyd2019 reopened https://github.com/llvm/llvm-project/pull/140169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX][SPIRV] Fix the lowering of dot4add (PR #140315)

2025-05-16 Thread Justin Bogner via cfe-commits
@@ -1,17 +1,19 @@ -// RUN: %clang_cc1 -finclude-default-header -triple \ -// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \ -// RUN: FileCheck %s -DTARGET=dx -// RUN: %clang_cc1 -finclude-default-header -triple \ -// RUN: spirv-pc-vulkan-com

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/138061 >From de0222f0459bb6c5832ccdbe70b19f5ea8b0cd98 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 30 Apr 2025 08:09:41 -0700 Subject: [PATCH] [clang-doc] Add HTMLMustacheGenerator methods Split from #133161.

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/140322 There was a problem introduced today where sometimes the CIR for functions with no arguments would be generated with phantom arguments. This was causing intermittent test failures. The problem appears to ha

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes There was a problem introduced today where sometimes the CIR for functions with no arguments would be generated with phantom arguments. This was causing intermittent test failures. The problem appears t

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes There was a problem introduced today where sometimes the CIR for functions with no arguments would be generated with phantom arguments. This was causing intermittent test failures. The problem appears to

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread Andy Kaylor via cfe-commits
@@ -112,8 +112,16 @@ class CIRGenFunctionInfo final // NOLINTNEXTLINE(readability-identifier-naming) void Profile(llvm::FoldingSetNodeID &id) { -id.AddBoolean(required.getOpaqueData()); -getReturnType().Profile(id); +// It's unfortunate that we are looping over

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **May 16, 8:28 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/138061). https://github.com/llvm/llvm-project/pull/138061

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM. Is there an easy to add a test for this? I understand sometimes it's hard, but just double checking. https://github.com/llvm/llvm-project/pull/140322 ___ cfe-commits mailing list cfe-c

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/138061 >From 187b130d43c4470768b3885cb9c333b9edfb3897 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 30 Apr 2025 08:09:41 -0700 Subject: [PATCH] [clang-doc] Add HTMLMustacheGenerator methods Split from #133161.

[clang-tools-extra] 6a0e626 - [clang-doc] Add HTMLMustacheGenerator methods (#138061)

2025-05-16 Thread via cfe-commits
Author: Paul Kirth Date: 2025-05-16T17:30:45-07:00 New Revision: 6a0e626af58bdf8ae8c07cfe8aec94f4565734a3 URL: https://github.com/llvm/llvm-project/commit/6a0e626af58bdf8ae8c07cfe8aec94f4565734a3 DIFF: https://github.com/llvm/llvm-project/commit/6a0e626af58bdf8ae8c07cfe8aec94f4565734a3.diff LO

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/138061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)

2025-05-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/138062 >From 442fe2fd1353c540bc0ec39ec913e7e414def6bc Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 30 Apr 2025 08:10:20 -0700 Subject: [PATCH] [clang-doc] Add helpers for Template config This patch adds or fil

[clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)

2025-05-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/138062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread Iris Shi via cfe-commits
https://github.com/el-ev approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/140322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -112,8 +112,16 @@ class CIRGenFunctionInfo final // NOLINTNEXTLINE(readability-identifier-naming) void Profile(llvm::FoldingSetNodeID &id) { -id.AddBoolean(required.getOpaqueData()); -getReturnType().Profile(id); +// It's unfortunate that we are looping over

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

2025-05-16 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > LGTM. Is there an easy to add a test for this? I understand sometimes it's > hard, but just double checking. The only thing I can think of would be a unit test that calculates folding set IDs for a bunch of similar, but slightly different, function signatures to verify tha

[clang] [libcxx] [Cygwin][MinGW] Internal class in explicitly-instantiation-declarated template should be instantiated (PR #140145)

2025-05-16 Thread via cfe-commits
jeremyd2019 wrote: trying to use this libc++ ci is less than helpful: the jobs keep failing for no apparent reason (cancelled? docker not running?), and whatever seems to be supposed to rerun the failed jobs is not all that reliable about doing so. Hopefully my llvm-mingw fork will show this

[clang] f7ef8dc - [CIR] Fix problem with phantom function arguments (#140322)

2025-05-16 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-05-16T18:01:12-07:00 New Revision: f7ef8dcbad9d5ac6cf2a8917d5ce03564fdfd0d8 URL: https://github.com/llvm/llvm-project/commit/f7ef8dcbad9d5ac6cf2a8917d5ce03564fdfd0d8 DIFF: https://github.com/llvm/llvm-project/commit/f7ef8dcbad9d5ac6cf2a8917d5ce03564fdfd0d8.diff L

[clang] [CIR] Fix problem with phantom function arguments (PR #140322)

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

[clang] [Driver] Use llvm::is_contained (NFC) (PR #140310)

2025-05-16 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich approved this pull request. https://github.com/llvm/llvm-project/pull/140310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Since getLastArgValue returns StringRef, and the constructor of SmallString accepts StringRef, we do not need to go through a temporary instance of std::string. --- Full diff: https://github.com/llvm/l

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

2025-05-16 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140326 Since getLastArgValue returns StringRef, and the constructor of SmallString accepts StringRef, we do not need to go through a temporary instance of std::string. >From 0f87807ef3159de0350dd85b4f5f8dd289c7

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Shafik Yaghmour via cfe-commits
@@ -26,14 +26,18 @@ void no_get_1() { auto [a0, a1] = A(); // expected-error {{decomposes into 3 elements}} auto [b0, b1] = B(); // expected-error {{decomposes into 3 elements}} } - auto [a0, a1, a2] = A(); // expected-error {{undeclared identifier 'get'}} expected-

[clang] [-Wunsafe-buffer-usage] Fix false warnings when const sized array is safely accessed (array [idx %const]) (PR #140113)

2025-05-16 Thread Malavika Samak via cfe-commits
malavikasamak wrote: CC @dtarditi https://github.com/llvm/llvm-project/pull/140113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an assertion in the resolution of perfect matches (PR #140073)

2025-05-16 Thread via cfe-commits
cor3ntin wrote: @alexfh Thanks a lot. I have a fix, a PR will be made once I run the tests https://github.com/llvm/llvm-project/pull/140073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

  1   2   3   4   5   >