[clang] [CodeGen][CFI] Generalize transparent union parameters (PR #158193)

2025-09-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka auto_merge_enabled https://github.com/llvm/llvm-project/pull/158193 ___ 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-09-12 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/139959 >From 92dbe95cf6f50ffb1150c5b2825e90a0cc87e06a 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] [Clang][Cygwin] Cygwin x86_64 should accepts __stdcall (PR #158385)

2025-09-12 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: cc: @jeremyd2019 https://github.com/llvm/llvm-project/pull/158385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-09-12 Thread via cfe-commits
https://github.com/joaosaffran closed https://github.com/llvm/llvm-project/pull/154629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Permit implicit conversion from integral to boolean vectors (PR #158369)

2025-09-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/158369 Summary: Clang supports boolean vectors as an extension to the vector model. These are commonly used to represent mask vectors in many vector ISAs. Currently, using these is quite difficult because all of the vec

[clang] [clang] fix incorrect assumption about function type 's ExtInfo (PR #157925)

2025-09-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/157925 This fixes an assumption that the ExtInfo for two same function types would have referential equality. This should compare these ExtInfos by value instead. The bug is pre-existing to https://github.com/llvm/l

[clang] Allow for custom code model in clang::Interpreter (PR #156977)

2025-09-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/156977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add sema check for global_atomic_fadd_v2f16 builtin (PR #158145)

2025-09-12 Thread Tim Gu via cfe-commits
@@ -436,4 +440,32 @@ void SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(Decl *D, addAMDGPUMaxNumWorkGroupsAttr(D, AL, AL.getArgAsExpr(0), YExpr, ZExpr); } + +bool SemaAMDGPU::checkAMDGCNAtomicFaddV2F16Type(CallExpr *TheCall) { + // Check that the pointer argument is a pointe

[clang-tools-extra] [clang-tidy] Fixed typo for bugprone-easily-swappable-parameters clang-tidy check (PR #158282)

2025-09-12 Thread via cfe-commits
0hDEADBEAF wrote: Indeed, this would break the current configuration files. You mentioned the release notes. Do I need to add anything to my PR regarding this? https://github.com/llvm/llvm-project/pull/158282 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-12 Thread Julia Hansbrough via cfe-commits
https://github.com/flowerhack updated https://github.com/llvm/llvm-project/pull/157213 >From af802c141faa33b1e743e9fb8710c96822d6e472 Mon Sep 17 00:00:00 2001 From: Julia Hansbrough Date: Fri, 5 Sep 2025 21:27:14 + Subject: [PATCH] Add bugprone-loop-variable-copied-then-modified clang-tidy

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/157667 >From 6aa3e6424865a5fc53489612ecb7f656f7165b9c Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Tue, 9 Sep 2025 13:42:46 +0100 Subject: [PATCH 1/2] [clang][Sema] Fix false positive -Wshadow with structure

[libclc] [libclc] Create LIBCLC_OUTPUT_LIBRARY_DIR directory before build (PR #158171)

2025-09-12 Thread Wenju He via cfe-commits
https://github.com/wenju-he closed https://github.com/llvm/llvm-project/pull/158171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Enabled debug entry support by default (PR #157703)

2025-09-12 Thread Georgiy Samoylov via cfe-commits
@@ -0,0 +1,74 @@ +;; Test RISC-V 64 bit: sga-sc wrote: Added test for 32 bit RISC-V https://github.com/llvm/llvm-project/pull/157703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [Clang][Doc] Modify HLSL semantics documentation (PR #157841)

2025-09-12 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/157841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore DeclRefExpr to a lambda in an no-escape argument (PR #155025)

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

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-12 Thread Nikita Popov via cfe-commits
nikic wrote: > This is the same code that triggered > https://github.com/llvm/llvm-project/issues/143908 but that reproducer does > not change with or without this patch. The root cause here is the same. This change just ends up unrolling additional cases and triggers the same underlying prob

[clang] [HLSL] Add support for input semantics in structs (PR #153224)

2025-09-12 Thread Nathan Gauër via cfe-commits
Keenuts wrote: This PR has diagnostics in codegen. Closing this to rework that part. https://github.com/llvm/llvm-project/pull/153224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Treat function pointers with "Singleton" suffix as singleton. (PR #158012)

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

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-09-12 Thread Ben Dunkin via cfe-commits
bdunkin wrote: Interesting, I guess thats something MSVC does not warn about. I can look in to fixing them. The bigger issue of whether the changes to existing behaviour are ok still needs to be addressed, and I think it would be a good idea to settle it before doing more work. https://github

[clang] Fix __builtin_object_size calculation for references of unknown origin in C++23 (PR #157778)

2025-09-12 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/157778 This addresses an issue introduced by 0a9c08c59ba61e727e9dee6d71883d9106963442, which implemented P2280R4. This fixes the issue reported in https://github.com/llvm/llvm-project/pull/95474#issuecomment-30258870

[clang-tools-extra] [clang-tools-extra][test] Ensure file is writeable after copying (PR #157728)

2025-09-12 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht created https://github.com/llvm/llvm-project/pull/157728 After #157572, the invocation to clang-tidy fails w/ `Could not open <...>/crlf.cpp.tmp.dir/Inputs/crlf/crlf.cpp for writing` if run in an environment where the source tree is mounted read-only. This is becau

[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

2025-09-12 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Update OpenMPSupport.rst and clang release notes https://github.com/llvm/llvm-project/pull/157063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][driver][arm][macho] Default to -mframe-pointer=non-leaf. (PR #154216)

2025-09-12 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli edited https://github.com/llvm/llvm-project/pull/154216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-12 Thread Victor Chernyakin via cfe-commits
localspook wrote: It looks like the check could be extended quite easily to support `cend`, not just `end`. (I’m not advocating doing that in *this* PR, but I noticed it and want to note it down) https://github.com/llvm/llvm-project/pull/157243 ___ c

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

2025-09-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/158109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-12 Thread Matheus Izvekov via cfe-commits
@@ -16,130 +16,385 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprConcepts.h" #include "clang/Basic/SourceLocation.h" +#include "clang/Sema/Ownership.h" #include "llvm/ADT/FoldingSet.h" -#include "

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-12 Thread via cfe-commits
@@ -4174,40 +4174,46 @@ __m512i test_mm512_rolv_epi32(__m512i __A, __m512i __B) { // CHECK: @llvm.fshl.v16i32 return _mm512_rolv_epi32(__A, __B); } +TEST_CONSTEXPR(match_v16si(_mm512_rolv_epi32((__m512i)(__v16si){ -1, -2, 3, -4, -5, -6, 7, 8, 9, -10, -11, -12, -13, 14, 1

[clang] [X86] Allow remaining AVX512 per-element shift intrinsics to be used in constexpr (PR #157696)

2025-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Simon Pilgrim (RKSimon) Changes Handle missing AVX512F epi64 and AVX512BW epi16 cases with existing code paths Fixes #154287 --- Patch is 52.88 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-12 Thread via cfe-commits
https://github.com/donneypr updated https://github.com/llvm/llvm-project/pull/157582 >From 0e67c0217dada580d43c30e03180b0977a6cce98 Mon Sep 17 00:00:00 2001 From: donneypr Date: Mon, 8 Sep 2025 19:54:43 -0400 Subject: [PATCH 1/4] [clang][x86][headers] Make SSE2 add/sub intrinsics constexpr --

[clang] [X86] Allow remaining AVX512 per-element shift intrinsics to be used in constexpr (PR #157696)

2025-09-12 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/157696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Just a first pass, I'll try to get some time to fully review later. https://github.com/llvm/llvm-project/pull/141776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-12 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From d2d7a00a4199329e32557f6787462f4ade948cbc Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/2] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang] Revert "[HLSL] Rewrite semantics parsing" (PR #157718)

2025-09-12 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts created https://github.com/llvm/llvm-project/pull/157718 Reverts llvm/llvm-project#152537 Broke the build in some cases. Need to investigate more for a proper solution. From d47a574d9ab76ae599a1d9dadbbaf9709ab35758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Ga

[clang-tools-extra] 65f9c08 - [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (#157285)

2025-09-12 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-09T18:27:14+03:00 New Revision: 65f9c0868f943064a690d9e4e2c6101feecdcab9 URL: https://github.com/llvm/llvm-project/commit/65f9c0868f943064a690d9e4e2c6101feecdcab9 DIFF: https://github.com/llvm/llvm-project/commit/65f9c0868f943064a690d9e4e2c6101feecdcab9.diff

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-12 Thread via cfe-commits
https://github.com/brenfwd updated https://github.com/llvm/llvm-project/pull/156763 >From 1082254d96f3c427f4cb867fcf964c19655e1876 Mon Sep 17 00:00:00 2001 From: Brenden Forward Date: Tue, 2 Sep 2025 18:16:46 -0700 Subject: [PATCH 1/8] Add google-runtime-float Clang-Tidy check --- .../clang-t

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-12 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 closed https://github.com/llvm/llvm-project/pull/156763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][bytecode] Allow SSE/AVX BLEND imm intrinsics to be used in constexpr (PR #157776)

2025-09-12 Thread via cfe-commits
https://github.com/brandonxin updated https://github.com/llvm/llvm-project/pull/157776 >From 019b3ba36b8205b57135ab22b4603fee7d453945 Mon Sep 17 00:00:00 2001 From: Brandon Xin Date: Tue, 9 Sep 2025 19:26:11 -0500 Subject: [PATCH 1/7] [X86][bytecode] Allow SSE/AVX BLEND imm intrinsics to be us

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-12 Thread via cfe-commits
@@ -4174,40 +4174,46 @@ __m512i test_mm512_rolv_epi32(__m512i __A, __m512i __B) { // CHECK: @llvm.fshl.v16i32 return _mm512_rolv_epi32(__A, __B); } +TEST_CONSTEXPR(match_v16si(_mm512_rolv_epi32((__m512i)(__v16si){ -1, -2, 3, -4, -5, -6, 7, 8, 9, -10, -11, -12, -13, 14, 1

[clang] [compiler-rt] [llvm] Add a field in Coverage Mapping header for tracking coverage capabilities (PR #158059)

2025-09-12 Thread Alan Phipps via cfe-commits
Dorian =?utf-8?q?Péron?= , Dorian =?utf-8?q?Péron?= , Dorian =?utf-8?q?Péron?= , Dorian =?utf-8?q?Péron?= Message-ID: In-Reply-To: @@ -2604,6 +2604,15 @@ void CoverageMappingModuleGen::emit() { }; auto CovDataHeaderTy = llvm::StructType::get(Ctx, ArrayRef(CovDataHe

[clang] [clang][ptrauth] Warn about the use of a weak signing schema (PR #157779)

2025-09-12 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] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Just style nits, otherwise LGTM https://github.com/llvm/llvm-project/pull/157667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [CIR] Add support for copy elision (PR #157713)

2025-09-12 Thread Andy Kaylor via cfe-commits
@@ -44,16 +46,37 @@ CIRGenFunction::emitAutoVarAlloca(const VarDecl &d, if (ty->isVariablyModifiedType()) cgm.errorNYI(d.getSourceRange(), "emitAutoVarDecl: variably modified type"); + assert(!cir::MissingFeatures::openMP()); + Address address = Address::invalid();

[clang] [llvm] [InstCombine] Split GEPs with multiple non-zero offsets (PR #151333)

2025-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Nikita Popov (nikic) Changes Split GEPs that have more than one non-zero offset into two GEPs. This is in preparation for the ptradd migration, which can only represent such GEPs. This also enables CSE and LICM of the common base.

[clang] [clang][OpenMP][SPIR-V] Fix addrspace of pointer kernel arguments (PR #157172)

2025-09-12 Thread Nick Sarnie via cfe-commits
@@ -682,23 +687,27 @@ CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S, SmallString<256> Buffer; llvm::raw_svector_ostream Out(Buffer); Out << CapturedStmtInfo->getHelperName(); - + OpenMPDirectiveKind EKind = getEffectiveDirectiveKind(D); + bo

[clang] bde4b53 - [analyzer][NFC] Change LiveVariablesImpl::inAssignment from DenseMap to DenseSet (#157685)

2025-09-12 Thread via cfe-commits
Author: Balazs Benics Date: 2025-09-09T18:13:28+02:00 New Revision: bde4b537f4bdb556cb99669fc46430110a8b260e URL: https://github.com/llvm/llvm-project/commit/bde4b537f4bdb556cb99669fc46430110a8b260e DIFF: https://github.com/llvm/llvm-project/commit/bde4b537f4bdb556cb99669fc46430110a8b260e.diff

[clang] [llvm] [IndVarSimplify] Sink unused l-invariant loads in preheader. (PR #157559)

2025-09-12 Thread Sirish Pande via cfe-commits
@@ -1100,14 +1112,32 @@ bool IndVarSimplify::sinkUnusedInvariants(Loop *L) { break; // Don't move instructions which might have side effects, since the side -// effects need to complete before instructions inside the loop. Also don't -// move instructions w

[clang] [libcxx] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-12 Thread Younan Zhang via cfe-commits
@@ -543,30 +672,330 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

2025-09-12 Thread via cfe-commits
cmtice wrote: I seem to have found an issue with this warning. I have some code roughly like this: if (var1 < 0) return; var2 = malloc(sizeof(...) * var1). I'm getting warnings complaining that the malloc is assigning -8 instead of 8. The only way it could be -8 would be if var1 was n

[clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-12 Thread Matheus Izvekov via cfe-commits
@@ -606,8 +606,11 @@ TemplateArgumentLoc::TemplateArgumentLoc(ASTContext &Ctx, LocInfo(Ctx, TemplateKWLoc, QualifierLoc, TemplateNameLoc, EllipsisLoc) { assert(Argument.getKind() == TemplateArgument::Template || Argument.getKind() == TemplateArgument::TemplateE

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-12 Thread Bhasawut Singhaphan via cfe-commits
@@ -24,6 +24,7 @@ typedef float __m128_u __attribute__((__vector_size__(16), __aligned__(1))); /* Unsigned types */ typedef unsigned int __v4su __attribute__((__vector_size__(16))); typedef unsigned short __v8hu __attribute__((__vector_size__(16))); +typedef unsigned char __v1

[clang] [llvm] Implements isnan() HLSL intrinsic for DXIL and SPIR-V targets. (PR #157733)

2025-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Dan Brown (danbrown-amd) Changes Addresses #99132. --- Full diff: https://github.com/llvm/llvm-project/pull/157733.diff 14 Files Affected: - (modified) clang/include/clang/Basic/Builtins.td (+6) - (modified) clang/lib/CodeGen

[clang] [clang] fix incorrect assumption about function type 's ExtInfo (PR #157925)

2025-09-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: LGTM https://github.com/llvm/llvm-project/pull/157925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-12 Thread Younan Zhang via cfe-commits
@@ -543,30 +672,330 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

[clang-tools-extra] [clang-tools-extra][test] Ensure file is writeable after copying (PR #157728)

2025-09-12 Thread via cfe-commits
https://github.com/cmtice approved this pull request. https://github.com/llvm/llvm-project/pull/157728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement ia32_select* builtins (PR #154758)

2025-09-12 Thread via cfe-commits
@@ -2778,6 +2778,40 @@ static bool interp__builtin_elementwise_fma(InterpState &S, CodePtr OpPC, return true; } +/// AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]". +static bool interp__builtin_select(InterpState &S, CodePtr OpPC, +

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-12 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/156763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-12 Thread Andy Kaylor via cfe-commits
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvH

[clang] [llvm] Implements isnan() HLSL intrinsic for DXIL and SPIR-V targets. (PR #157733)

2025-09-12 Thread Farzon Lotfi via cfe-commits
@@ -303,6 +303,43 @@ fmod(__detail::HLSL_FIXED_VECTOR X, return __detail::fmod_vec_impl(X, Y); } +//===--===// +// isnan builtins +//===--=

[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

2025-09-12 Thread via cfe-commits
@@ -3932,6 +3958,18 @@ OMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, if (NeedAnExpression && Val.isInvalid()) return nullptr; + if (Kind == OMPC_default && getLangOpts().OpenMP < 51 && Arg[0] && + (static_cast(Arg[0]) == OMP_DEFA

[clang] [clang-repl] Add support for running custom code in Remote JIT executor (PR #157358)

2025-09-12 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 updated https://github.com/llvm/llvm-project/pull/157358 >From 4410aeb08dc14a4f29c9ec0e8730a1bde3386665 Mon Sep 17 00:00:00 2001 From: kr-2003 Date: Mon, 8 Sep 2025 00:19:44 +0530 Subject: [PATCH 1/6] [clang-repl] Adding custom lambda in launchExecutor --- clang/inc

[clang] [AMDGPU][SPIRV] Use SPIR-V syncscopes for some AMDGCN BIs (PR #154867)

2025-09-12 Thread Yaxun Liu via cfe-commits
@@ -238,13 +248,19 @@ void CodeGenFunction::ProcessOrderScopeAMDGCN(Value *Order, Value *Scope, SSID = llvm::SyncScope::System; break; case 1: // __MEMORY_SCOPE_DEVICE -SSID = getLLVMContext().getOrInsertSyncScopeID("agent"); +if (getTarget().getTriple().isSP

[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

2025-09-12 Thread via cfe-commits
@@ -3734,6 +3734,32 @@ OMPClause *Parser::ParseOpenMPSingleExprWithArgClause(OpenMPDirectiveKind DKind, ConsumeAnyToken(); if (Arg.back() == OMPC_DIST_SCHEDULE_static && Tok.is(tok::comma)) DelimLoc = ConsumeAnyToken(); + } else if (Kind == OMPC_default) { ---

[clang-tools-extra] [clang-tidy] add option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)

2025-09-12 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/156220 >From 5baddd86094b185aeb5ecd34e13a3c715d6c1ee3 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Sat, 30 Aug 2025 19:32:56 -0700 Subject: [PATCH 1/2] [clang-tidy] add option to `readability-use-concise-

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -4,6 +4,8 @@ // RUN: %clang_cc1 -triple x86_64-apple-macosx -verify -emit-llvm-only %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -verify -emit-llvm-only %s // RUN: %clang_cc1 -triple aarch64-pc-windows-msvcu -verify -emit-llvm-only %s +// RUN: %clang_cc1 -triple powe

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-12 Thread Shilei Tian via cfe-commits
@@ -5654,6 +5654,130 @@ static void handleLaunchBoundsAttr(Sema &S, Decl *D, const ParsedAttr &AL) { AL.getNumArgs() > 2 ? AL.getArgAsExpr(2) : nullptr); } +static std::pair +makeClusterDimsArgExpr(Sema &S, Expr *E, const CUDAClusterDimsAttr &AL, +

[clang] [NFCI] Fix Wattributes warnings from Sema. (PR #157906)

2025-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes See: https://github.com/llvm/llvm-project/issues/157834 There is some visibility concerns here, so this patch suppresses the diagnostic. I believe we are doing this intentionally, so unless someone comes

[clang] [clang] VectorExprEvaluator::VisitCallExpr - add constant folding for X86 pslldqi/psrldqi infrinsics (PR #157403)

2025-09-12 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. test coverage? they need adding to sse2-builtins.c and avx2-builtins.c https://github.com/llvm/llvm-project/pull/157403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -146,26 +146,9 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-bforceimprw"); } - // PGO instrumentation generates symbols belonging to special sections, and - // the linker needs to place all symbols in a particular secti

[clang] [Clang] Fix __cpuidex conflict with other offloading targets (PR #157741)

2025-09-12 Thread Nick Sarnie via cfe-commits
@@ -348,7 +348,7 @@ static __inline int __get_cpuid_count (unsigned int __leaf, // In some cases, offloading will set the host as the aux triple and define the // builtin. Given __has_builtin does not detect builtins on aux triples, we need // to explicitly check for some offl

[clang] Thread Safety Analysis: Basic capability alias-analysis (PR #142955)

2025-09-12 Thread Marco Elver via cfe-commits
https://github.com/melver updated https://github.com/llvm/llvm-project/pull/142955 >From 241dc5b0a567f789e5051843c81281447beaa570 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Wed, 21 May 2025 23:49:48 +0200 Subject: [PATCH] Thread Safety Analysis: Basic capability alias-analysis Add basic

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-12 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %check_clang_tidy %s bugprone-loop-variable-copied-then-modified %t -- -- -I%S -std=c++!4 -config="{CheckOptions: {bugprone-loop-variable-copied-then-modified.IgnoreInexpensiveVariables: true}}" + +#include "Inputs/system-header-simulator/sim_set" +#inc

[clang] [APINotes] Support annotating safety of APIs (PR #157506)

2025-09-12 Thread Doug Gregor via cfe-commits
https://github.com/DougGregor approved this pull request. https://github.com/llvm/llvm-project/pull/157506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [lit] Implement ulimit builtin (PR #157958)

2025-09-12 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: Yeah, just got a couple of the emails. I'll revert this for now and take a look locally when I have a chance to get a build setup. https://github.com/llvm/llvm-project/pull/157958 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-12 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/148281 >From 029d9fce6cdb75ea4819a107c7ed9f074bb36678 Mon Sep 17 00:00:00 2001 From: moorabbit <215698969+moorab...@users.noreply.github.com> Date: Mon, 7 Jul 2025 09:25:46 -0400 Subject: [PATCH 01/20] [Clang] Add `__

[clang] [HLSL][DirectX] Fix resource lowering when using structs with `select` (PR #158361)

2025-09-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/158361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Avoid reparsing VFS overlay files for module dep collector (PR #158372)

2025-09-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/158372 This PR uses the new-ish `llvm::vfs::FileSystem::visit()` interface to collect VFS overlay entries from an existing `FileSystem` instance rather than parsing the VFS YAML file anew. This prevents duplicate

[clang] [libcxx] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-12 Thread Younan Zhang via cfe-commits
@@ -543,30 +672,330 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-12 Thread via cfe-commits
https://github.com/EugeneZelenko approved this pull request. https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-12 Thread Michał Górny via cfe-commits
mgorny wrote: I'm guessing this change broke the build for me: ``` FAILED: [code=1] docs/AttributeReference.rst /var/tmp/portage/llvm-core/clang-22.0.0./work/x/y/clang-.arm64/docs/AttributeReference .rst cd /var/tmp/portage/llvm-core/clang-22.0.0./work/x/y/clang-.arm64/docs && /var/tm

[clang] acd0899 - [X86] Add F16C f16 -> f32 constexpr support (#158142)

2025-09-12 Thread via cfe-commits
Author: Abhinav Pappu Date: 2025-09-12T15:09:13+01:00 New Revision: acd08993b2ab7e5d64a7932fb5b4630f51eedc72 URL: https://github.com/llvm/llvm-project/commit/acd08993b2ab7e5d64a7932fb5b4630f51eedc72 DIFF: https://github.com/llvm/llvm-project/commit/acd08993b2ab7e5d64a7932fb5b4630f51eedc72.diff

[clang] Revert "[HLSL] Rewrite semantics parsing" (PR #157718)

2025-09-12 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts auto_merge_enabled https://github.com/llvm/llvm-project/pull/157718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore DeclRefExpr to a lambda in an no-escape argument (PR #155025)

2025-09-12 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/155025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Flang][OpenMP] Enable no-loop kernels (PR #155818)

2025-09-12 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,96 @@ +! REQUIRES: flang, amdgpu Meinersbur wrote: ```suggestion ! REQUIRES: flang ``` Shouldn't this still be correct with nvidia GPUs? https://github.com/llvm/llvm-project/pull/155818 ___ cfe-commits maili

[clang] [Clang] Add vector gather / scatter builtins to clang (PR #157895)

2025-09-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/157895 >From 105d21ef27d1993527924e1da5f181dc9a67eff1 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 10 Sep 2025 11:41:25 -0500 Subject: [PATCH 1/3] [Clang] Add vector gather / scatter builtins to clang Summar

[clang] [analyzer] Prevent triplicate warnings for `sarif-html` (PR #158112)

2025-09-12 Thread Dave Bartolomeo via cfe-commits
https://github.com/dbartol created https://github.com/llvm/llvm-project/pull/158112 When `-analyzer-output=sarif-html` is specified, the analyzer was reporting each warning to the console three times. This is because the code to create the diagnostic consumers for `sarif-html` was calling the

[clang] Driver: Fix two comments for accuracy. (PR #157769)

2025-09-12 Thread Peter Collingbourne via cfe-commits
https://github.com/pcc closed https://github.com/llvm/llvm-project/pull/157769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add the `Frs` `DXC` driver option (PR #157690)

2025-09-12 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/157690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [offload][OpenMP] Remove device code for num_threads strict (PR #157893)

2025-09-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Can we keep the OMPKinds definitions? I figure we'll need those for the CPU side. https://github.com/llvm/llvm-project/pull/157893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [analyzer] Prevent triplicate warnings for `sarif-html` (PR #158112)

2025-09-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dave Bartolomeo (dbartol) Changes When `-analyzer-output=sarif-html` is specified, the analyzer was reporting each warning to the console three times. This is because the code to create the diagnostic consumers for `sarif-html` was callin

[clang] [CIR][NFC] Fix build warnings after #154142 (PR #157724)

2025-09-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha approved this pull request. https://github.com/llvm/llvm-project/pull/157724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-12 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/157667 >From 6aa3e6424865a5fc53489612ecb7f656f7165b9c Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Tue, 9 Sep 2025 13:42:46 +0100 Subject: [PATCH 1/5] [clang][Sema] Fix false positive -Wshadow with structure

[clang] [llvm] [AMDGPU] Add builtins and intrinsics for cluster attributes (PR #157877)

2025-09-12 Thread Shilei Tian via cfe-commits
shiltian wrote: > Any tests for intrinsics? Do you mean the lowering of the intrinsics? https://github.com/llvm/llvm-project/pull/157877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] Implements isnan() HLSL intrinsic for DXIL and SPIR-V targets. (PR #157733)

2025-09-12 Thread Farzon Lotfi via cfe-commits
farzonl wrote: you need a `llvm/test/CodeGen/DirectX/isnan.ll` You can use [llvm/test/CodeGen/DirectX/isinf.ll](https://github.com/llvm/llvm-project/blob/8036edb21dbedf79687613caef3d40aa5a50ddf2/llvm/test/CodeGen/DirectX/isinf.ll) as a reference. The one difference I would do is: ``` ; RUN: op

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-09-12 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good other than my comment about `isValidRangeType` https://github.com/llvm/llvm-project/pull/154629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][bytecode] Check builtin carryops for dummy pointers (PR #157490)

2025-09-12 Thread Shafik Yaghmour via cfe-commits
@@ -36,3 +36,10 @@ void test_builtin_os_log(void *buf, int i, const char *data) { constexpr int len = __builtin_os_log_format_buffer_size("%d %{public}s %{private}.16P", i, data, data); static_assert(len > 0, "Expect len > 0"); } + +void addc_dummy() +{ + unsigned int a;

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-12 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > In principle I could set up this configuration right? (Obviously not actually > test it, but in principle at least be able to verify it builds before pushing > the update) @ojhunt It would be very nice if you could do it and ensure things are at least building w/o compile er

[clang] [llvm] [mlir] [Flang][OpenMP] Enable no-loop kernels (PR #155818)

2025-09-12 Thread Michael Kruse via cfe-commits
@@ -3835,10 +3835,23 @@ let Visibility = [ClangOption, CC1Option, FC1Option, FlangOption] in { let Group = f_Group in { def fopenmp_target_debug_EQ : Joined<["-"], "fopenmp-target-debug=">; -def fopenmp_assume_teams_oversubscription : Flag<["-"], "fopenmp-assume-teams-oversu

[clang] [llvm] [Sema][Parse][HLSL] Implement front-end rootsignature validations (PR #156754)

2025-09-12 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/156754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-09-12 Thread Justin Bogner via cfe-commits
@@ -209,6 +202,13 @@ inline bool isValidParameterType(uint32_t V) { return false; } +inline bool isValidRangeType(uint32_t V) { + static_assert(llvm::to_underlying(dxil::ResourceClass::Sampler) == 3, +"dxil::ResourceClass numeric values must match the Root "

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-12 Thread Julia Hansbrough via cfe-commits
flowerhack wrote: Thanks for the feedback; I believe I've addressed all comments, save one comment from @zwuis which I requested clarification on. Let me know if there's anything else. https://github.com/llvm/llvm-project/pull/157213 ___ cfe-commits

  1   2   3   4   5   6   7   8   9   10   >